1 if (NOT VCONONE_VERSION)
2 set(VCONONE_VERSION 0x00000000000c0001)
3 # NOTE order is [build patch minor major]
4 # if VCONONE_VERSION is set with -D option, it will be cached
5 # you may have to remove cache file if you remove -D option
8 configure_file(version_cfg.h.in version_cfg.h @ONLY)
10 set(DRIVER "driver/driver.cpp")
12 file(GLOB_RECURSE SOURCES "src/*.cpp")
13 file(GLOB_RECURSE TESTS "src/*.test.cpp")
14 list(REMOVE_ITEM SOURCES ${TESTS})
16 add_library(vconone STATIC ${SOURCES})
17 target_include_directories(vconone PUBLIC include)
18 target_include_directories(vconone PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
20 add_executable(one-version ${DRIVER})
21 target_link_libraries(one-version vconone)
22 install(TARGETS one-version DESTINATION bin)
26 endif(NOT ENABLE_TEST)
28 nnas_find_package(GTest REQUIRED)
30 GTest_AddTest(vconone_test ${TESTS})
31 target_link_libraries(vconone_test vconone)