-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCMakeLists.txt
33 lines (26 loc) · 1.3 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# CMakeList.txt : CMake project for Mujina, include source and define
# project specific logic here.
#
cmake_minimum_required (VERSION 3.8)
# Enable Hot Reload for MSVC compilers if supported.
if (POLICY CMP0141)
cmake_policy(SET CMP0141 NEW)
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
endif()
project ("Mujina")
file(GLOB APP_SOURCES "libMujina/*/*.cpp" "libMujina/*/*.c" "libMujina/*.cpp" "libMujina/*.c" "libMujina/*.hpp" "libMujina/*.h" "libMujina/*/*.hpp" "libMujina/*/*.h")
add_library (libMujina SHARED ${APP_SOURCES})
target_link_directories(libMujina PUBLIC "libMujina/lib")
target_include_directories(libMujina PUBLIC "libMujina/include")
set_property(TARGET libMujina PROPERTY CXX_STANDARD 20)
target_link_libraries(libMujina PUBLIC "jvm")
if(WIN32)
target_link_libraries(libMujina PUBLIC "shlwapi" "WS2_32" "CRYPT32")
target_include_directories(libMujina PUBLIC "libMujina/include/JNI/win32")
elseif(UNIX)
target_link_libraries(libMujina PUBLIC "X11") #sudo apt install libx11-dev
target_include_directories(libMujina PUBLIC "libMujina/include/JNI/linux")
endif()
# JNI include
find_package(JNI REQUIRED)
include_directories(${JNI_INCLUDE_DIRS})