1
0
mirror of https://github.com/kakwa/uts-server synced 2024-11-11 12:08:54 +01:00
uts-server/CMakeLists.txt

51 lines
1.2 KiB
CMake
Raw Normal View History

2015-12-16 23:11:08 +01:00
cmake_minimum_required (VERSION 2.6)
project (uts-server)
set(VERSION 0.1.0)
option(DEBUG "compile with debug symbol" OFF)
if(DEBUG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g")
set(CMAKE_BUILD_TYPE Debug)
endif(DEBUG)
2015-12-16 23:11:08 +01:00
add_custom_target(tag
git tag -a "${VERSION}" -m "version ${VERSION}" &&
git push origin ${VERSION}
)
2015-12-17 15:48:55 +01:00
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -DUTS_VERSION='\"${VERSION}\"'")
2015-12-16 23:11:08 +01:00
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
2016-08-19 00:04:13 +02:00
find_package(libcivetweb REQUIRED)
MESSAGE( STATUS "Find Header Directory for libcivetweb: " ${LIBCIVETWEB_INCLUDE_DIR})
MESSAGE( STATUS "Find Dynamic Library for libcivetweb: " ${LIBCIVETWEB_LIBRARIES})
2015-12-16 23:11:08 +01:00
2015-12-17 14:09:09 +01:00
find_package(OpenSSL REQUIRED)
MESSAGE( STATUS "OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
MESSAGE( STATUS "OpenSSL libraries: ${OPENSSL_LIBRARIES}")
2015-12-16 23:11:08 +01:00
include_directories(
2015-12-17 21:47:41 +01:00
./inc/
2016-08-19 00:04:13 +02:00
${LIBCIVETWEB_INCLUDE_DIR}
2015-12-17 14:09:09 +01:00
${OPENSSL_INCLUDE_DIR}
2015-12-16 23:11:08 +01:00
)
2015-12-17 21:47:41 +01:00
add_executable(uts-server
src/cmd/uts-server.c
src/lib/rfc3161.c
src/lib/http.c
2015-12-17 21:47:41 +01:00
src/lib/utils.c
)
2015-12-16 23:11:08 +01:00
2015-12-17 14:09:09 +01:00
target_link_libraries(uts-server
2016-08-19 00:04:13 +02:00
${LIBCIVETWEB_LIBRARIES}
2015-12-17 14:09:09 +01:00
${OPENSSL_LIBRARIES}
)
2015-12-16 23:11:08 +01:00
INSTALL(TARGETS uts-server
RUNTIME DESTINATION bin
)