-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCMakeLists.txt
43 lines (33 loc) · 1.21 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
34
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
# Overriding the CMake flags to use static runtime libraries
# See http://www.cmake.org/Wiki/CMake_FAQ#
# How_can_I_build_my_MSVC_application_with_a_static_runtime.3F
set(CMAKE_USER_MAKE_RULES_OVERRIDE
${CMAKE_CURRENT_SOURCE_DIR}/CMake_c_flag_overrides.cmake)
set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX
${CMAKE_CURRENT_SOURCE_DIR}/CMake_cxx_flag_overrides.cmake)
project(JOCLCommon)
if(NOT ANDROID)
find_package(JNI REQUIRED)
endif()
if(MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Wall /wd4514 /wd4820 /wd4710 /wd4711 /wd4350 /wd4668")
endif()
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${PROJECT_SOURCE_DIR}/nativeLibs/Debug)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${PROJECT_SOURCE_DIR}/nativeLibs)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/nativeLibs)
include_directories(
src/main/native
src/main/include/
${JNI_INCLUDE_DIRS}
)
add_library(JOCLCommon
src/main/native/Logger.cpp
src/main/native/CLJNIUtils.cpp
src/main/native/JNIUtils.cpp
src/main/native/PointerUtils.cpp
src/main/native/ConversionsCL.cpp
)
set(BUILD_SHARED_LIBS ON)
# Enable C++11 Features.
set_property(TARGET JOCLCommon PROPERTY CXX_STANDARD 11)