Created first version of CMakeLists.txt

This commit is contained in:
2019-05-15 23:23:24 +02:00
parent 6aa2df9d30
commit 4575ff7ab2
3 changed files with 40 additions and 0 deletions
+1
View File
@@ -23,3 +23,4 @@ NT/elogd.opensdf
vc110.idb
elog*.exe
NT/x64/Debug/
build
+39
View File
@@ -0,0 +1,39 @@
# CMakeLists.txt for ELOG project
project(ELOG)
cmake_minimum_required(VERSION 2.8)
# compile options
option(USE_SSL "Use OpenSSL library for https" OFF)
include_directories(${CMAKE_SOURCE_DIR}/mxml)
# default compiler flags
add_compile_options(-Wall -Wno-deprecated-declarations)
# disable warnings for regex.c
set_source_files_properties(${CMAKE_SOURCE_DIR}/src/regex.c PROPERTIES COMPILE_FLAGS -w)
# optional SSL stuff
if (USE_SSL)
add_compile_definitions(HAVE_SSL)
find_package(OPENSSL REQUIRED)
include_directories(${OPENSSL_INCLUDE_DIR})
endif (USE_SSL)
add_executable(elogd
${CMAKE_SOURCE_DIR}/src/elogd.c
${CMAKE_SOURCE_DIR}/src/auth.c
${CMAKE_SOURCE_DIR}/mxml/mxml.c
${CMAKE_SOURCE_DIR}/src/crypt.c
${CMAKE_SOURCE_DIR}/src/regex.c
)
add_executable(elog
${CMAKE_SOURCE_DIR}/src/elog.c
${CMAKE_SOURCE_DIR}/src/crypt.c
)
target_link_libraries(elogd ${OPENSSL_LIBRARIES})
target_link_libraries(elog ${OPENSSL_LIBRARIES})
View File