aboutsummaryrefslogtreecommitdiff
path: root/contrib/chained/examples/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/chained/examples/CMakeLists.txt')
-rw-r--r--contrib/chained/examples/CMakeLists.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/contrib/chained/examples/CMakeLists.txt b/contrib/chained/examples/CMakeLists.txt
new file mode 100644
index 0000000..936c2b3
--- /dev/null
+++ b/contrib/chained/examples/CMakeLists.txt
@@ -0,0 +1,40 @@
+cmake_minimum_required(VERSION 2.8)
+
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_SOURCE_DIR}/")
+
+project (ChainedLibconfigExample)
+file(GLOB SOURCES *.cpp *.h ../*.h ../*.md)
+
+if(MSVC)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
+else()
+ find_package(libconfig)
+endif()
+
+if(CMAKE_COMPILER_IS_GNUCXX)
+ #set(CMAKE_BUILD_TYPE Debug)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+endif()
+
+include_directories(
+ ${CMAKE_SOURCE_DIR}/../../../lib/
+)
+
+if(MSVC)
+ link_libraries (
+ ${CMAKE_SOURCE_DIR}/../../../Debug/libconfig++.lib
+ )
+else()
+link_libraries (
+ ${LIBCONFIG_LIBRARY}
+)
+endif()
+
+
+add_executable (
+ ChainedLibconfigExample
+# WIN32 # Only if you don't want the DOS prompt to appear in the background in Windows
+# MACOSX_BUNDLE
+ ${SOURCES} # We could've listed the source files here directly instead of using a variable to store them
+ #${INCLUDES}
+)