lifo-dijkstraserv/CMakeLists.txt

25 lines
936 B
CMake
Raw Normal View History

2020-05-01 16:33:48 +02:00
cmake_minimum_required(VERSION 3.5)
project(lifo-dijkstraserv LANGUAGES C)
2020-05-01 16:36:57 +02:00
#set(CMAKE_BUILD_TYPE Release)
set(CMAKE_C_FLAGS "-Wall")
2020-05-01 16:33:48 +02:00
2020-05-01 16:36:57 +02:00
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB2 REQUIRED glib-2.0)
pkg_check_modules(GOBJECT2 REQUIRED gobject-2.0)
pkg_check_modules(SOUP REQUIRED libsoup-2.4)
pkg_check_modules(JSON REQUIRED json-glib-1.0)
2020-05-01 20:48:16 +02:00
INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS} ${GOBJECT2_INCLUDE_DIRS} ${SOUP_INCLUDE_DIRS} ${JSON_INCLUDE_DIRS})
LINK_DIRECTORIES(${GLIB2_LIBRARY_DIRS} ${GOBJECT2_LIBRARY_DIRS} ${SOUP_LIBRARY_DIRS} ${JSON_LIBRARY_DIRS})
2020-05-01 16:36:57 +02:00
add_definitions(${GLIB2_CFLAGS_OTHER} ${GOBJECT2_CFLAGS_OTHER} ${SOUP_CFLAGS_OTHER} ${JSON_CFLAGS_OTHER})
FILE(GLOB_RECURSE HEADERS "src/*.h")
aux_source_directory(./src SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST} "${HEADERS}")
2020-05-01 20:48:16 +02:00
target_link_libraries(${PROJECT_NAME} ${SOUP_LIBRARIES} ${JSON_LIBRARIES})
install (TARGETS ${PROJECT_NAME} DESTINATION bin)