-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
55 lines (47 loc) · 1.48 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
44
45
46
47
48
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 3.13)
project(heap-analyzer-native-agent)
set(LIB_MAJOR_VERSION "0")
set(LIB_MINOR_VERSION "1")
set(LIB_PATCH_VERSION "0")
set(LIB_VERSION_STRING "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VERSION}")
message("\nBuilding ${PROJECT_NAME} ${LIB_VERSION_STRING}\n")
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_COLOR_MAKEFILE ON)
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 11)
include_directories(
"$ENV{JAVA_HOME}/include"
"build/generated/sources/native/headers/main"
)
if (WIN32)
message("Win32")
include_directories(
"$ENV{JAVA_HOME}/include/win32"
"$ENV{JAVA_HOME}/include"
"build/generated/sources/native/headers/main"
"src/main/h"
)
elseif (APPLE)
message("Apple")
include_directories(
"$ENV{JAVA_HOME}/include/darwin"
"$ENV{JAVA_HOME}/include"
"build/generated/sources/native/headers/main"
"src/main/h"
)
else ()
message("Linux")
include_directories(
"$ENV{JAVA_HOME}/include/linux"
"$ENV{JAVA_HOME}/include"
"build/generated/sources/native/headers/main"
"src/main/h"
)
endif ()
set(SOURCE_FILES
src/main/cpp/agent.cpp
src/main/cpp/references.cpp
src/main/cpp/simple_functions.cpp
src/main/cpp/utils.cpp)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY build/libs)
add_library(heap-analyzer-native-agent SHARED ${SOURCE_FILES})