aboutsummaryrefslogtreecommitdiff
path: root/examples/c/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/c/CMakeLists.txt')
-rw-r--r--examples/c/CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/c/CMakeLists.txt b/examples/c/CMakeLists.txt
new file mode 100644
index 0000000..ea5e774
--- /dev/null
+++ b/examples/c/CMakeLists.txt
@@ -0,0 +1,17 @@
+if(CMAKE_HOST_WIN32)
+ set(libname "libconfig")
+else()
+ set(libname "config")
+endif()
+
+add_executable(c_example1 example1.c )
+add_executable(c_example2 example2.c )
+add_executable(c_example3 example3.c )
+
+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_link_libraries(c_example1 ${libname} )
+target_link_libraries(c_example2 ${libname} )
+target_link_libraries(c_example3 ${libname} )