basin/CMakeLists.txt

29 lines
729 B
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.6)
project(basin)
2017-09-18 04:38:58 +00:00
set(CMAKE_C_STANDARD 11)
option(JAVA_PLUGIN_SUPPORT "Enables Java plugin support, requires JAVA_HOME variable" ON)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-discarded-qualifiers")
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}")
target_link_libraries(basin jvm)
2019-04-18 15:59:54 +00:00
target_include_directories(basin PRIVATE "${JAVA_INCLUDE_PATH}")
endif()