2017-09-16 17:53:35 +00:00
|
|
|
cmake_minimum_required(VERSION 3.6)
|
2019-04-14 20:45:32 +00:00
|
|
|
project(basin)
|
2017-09-16 17:53:35 +00:00
|
|
|
|
2017-09-18 04:38:58 +00:00
|
|
|
set(CMAKE_C_STANDARD 11)
|
2017-09-16 17:53:35 +00:00
|
|
|
|
2019-04-14 20:45:32 +00:00
|
|
|
option(JAVA_PLUGIN_SUPPORT "Enables Java plugin support, requires JAVA_HOME variable" ON)
|
2017-09-16 17:53:35 +00:00
|
|
|
|
2019-04-14 20:45:32 +00:00
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-discarded-qualifiers")
|
2017-09-16 17:53:35 +00:00
|
|
|
|
2019-04-14 20:45:32 +00:00
|
|
|
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
|
|
|
|
|
|
|
|
file(GLOB src
|
|
|
|
"src/*.c"
|
|
|
|
"src/*.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(basin ${src})
|
|
|
|
|
|
|
|
target_link_libraries(basin pthread crypto ssl m z dl avuna-util)
|
|
|
|
target_include_directories(basin PUBLIC include/)
|
|
|
|
|
|
|
|
if (JAVA_PLUGIN_SUPPORT)
|
2019-04-18 15:59:54 +00:00
|
|
|
find_package(JNI)
|
|
|
|
target_link_directories(basin PRIVATE "${JAVA_JVM_LIBRARY}")
|
2019-04-14 20:45:32 +00:00
|
|
|
target_link_libraries(basin jvm)
|
2019-04-18 15:59:54 +00:00
|
|
|
target_include_directories(basin PRIVATE "${JAVA_INCLUDE_PATH}")
|
2019-04-14 20:45:32 +00:00
|
|
|
endif()
|
2017-09-16 17:53:35 +00:00
|
|
|
|