2018-07-27 08:41:06 +00:00
|
|
|
cmake_minimum_required(VERSION 3.7)
|
|
|
|
project(coio)
|
|
|
|
|
|
|
|
add_library(${PROJECT_NAME}
|
|
|
|
coro.c
|
|
|
|
coio.c
|
2018-08-06 05:47:19 +00:00
|
|
|
channel.c
|
2018-07-27 08:41:06 +00:00
|
|
|
coio_glib.c)
|
|
|
|
|
|
|
|
add_custom_target(${PROJECT_NAME}_files SOURCES coioimpl.h)
|
|
|
|
|
|
|
|
set_property(TARGET ${PROJECT_NAME} PROPERTY C_STANDARD 99)
|
|
|
|
target_compile_options(${PROJECT_NAME} PRIVATE -W -Wall -Wextra -Werror)
|
|
|
|
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_check_modules(GLIB2 REQUIRED glib-2.0)
|
2018-07-30 09:58:55 +00:00
|
|
|
pkg_check_modules(GIO2 REQUIRED gio-2.0)
|
2018-07-27 08:41:06 +00:00
|
|
|
|
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC ${GLIB2_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(${PROJECT_NAME} ${GLIB2_LIBRARIES})
|
|
|
|
|
2018-07-30 09:58:55 +00:00
|
|
|
target_include_directories(${PROJECT_NAME} PRIVATE ${GIO2_INCLUDE_DIRS})
|
|
|
|
target_link_libraries(${PROJECT_NAME} ${GIO2_LIBRARIES})
|
2018-07-30 09:54:41 +00:00
|
|
|
|
|
|
|
target_link_libraries(${PROJECT_NAME} m)
|
|
|
|
|
2018-07-27 08:41:06 +00:00
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC .)
|