diff options
Diffstat (limited to 'examples/c++/CMakeLists.txt')
-rw-r--r-- | examples/c++/CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/c++/CMakeLists.txt b/examples/c++/CMakeLists.txt new file mode 100644 index 0000000..6452e39 --- /dev/null +++ b/examples/c++/CMakeLists.txt @@ -0,0 +1,20 @@ +if(CMAKE_HOST_WIN32) + set(libname "libconfig") +else() + set(libname "config") +endif() + +add_executable(c++_example1 example1.cpp ) +add_executable(c++_example2 example2.cpp ) +add_executable(c++_example3 example3.cpp ) +add_executable(c++_example4 example4.cpp ) + +target_include_directories(c++_example1 PRIVATE ${CMAKE_SOURCE_DIR}/lib) +target_include_directories(c++_example2 PRIVATE ${CMAKE_SOURCE_DIR}/lib) +target_include_directories(c++_example3 PRIVATE ${CMAKE_SOURCE_DIR}/lib) +target_include_directories(c++_example4 PRIVATE ${CMAKE_SOURCE_DIR}/lib) + +target_link_libraries(c++_example1 ${libname}++ ) +target_link_libraries(c++_example2 ${libname}++ ) +target_link_libraries(c++_example3 ${libname}++ ) +target_link_libraries(c++_example4 ${libname}++ ) |