From 6bf13423cb889246422e0a1712ebeb2bc0824ed7 Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Fri, 10 Jun 2016 21:28:52 +0200 Subject: [PATCH] - added missing cmake file for server_example_logging --- .../server_example_logging/CMakeLists.txt | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 examples/server_example_logging/CMakeLists.txt diff --git a/examples/server_example_logging/CMakeLists.txt b/examples/server_example_logging/CMakeLists.txt new file mode 100644 index 00000000..598cfaef --- /dev/null +++ b/examples/server_example_logging/CMakeLists.txt @@ -0,0 +1,41 @@ + +if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../../third_party/sqlite/sqlite3.h") +message("Found sqlite source code -> compile sqlite-log driver with static sqlite library") + +include_directories( + . + ${CMAKE_SOURCE_DIR}/third_party/sqlite +) + +set(server_example_SRCS + server_example_logging.c + static_model.c + ${CMAKE_SOURCE_DIR}/src/logging/drivers/sqlite/log_storage_sqlite.c +) + +set(sqlite_SRCS + ${CMAKE_SOURCE_DIR}/third_party/sqlite/sqlite3.c +) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DSQLITE_THREADSAFE=0 -DSQLITE_OMIT_LOAD_EXTENSION") + +IF(WIN32) +set_source_files_properties(${server_example_SRCS} + PROPERTIES LANGUAGE CXX) +ENDIF(WIN32) + +add_executable(server_example_logging + ${server_example_SRCS} + ${sqlite_SRCS} +) + +target_link_libraries(server_example_logging + iec61850 +) + +ELSE() + +message("server-example-logging: sqlite not found") + +ENDIF() +