This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
66 lines (55 loc) · 1.87 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
56
57
58
59
60
61
62
63
64
65
66
cmake_minimum_required(VERSION 3.5)
project(jnif)
set(CMAKE_VERBOSE_MAKEFILE OFF)
set(CMAKE_CXX_STANDARD 11)
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
find_package(JNI)
find_package(Java QUIET)
include(UseJava)
add_library(jnif
src-libjnif/parser.cpp
src-libjnif/base.cpp
src-libjnif/jnif.hpp
src-libjnif/printer.cpp
src-libjnif/writer.cpp
src-libjnif/stream.cpp
src-libjnif/jar.cpp
src-libjnif/model.cpp
src-libjnif/analysis.cpp
src-libjnif/zip/ioapi.c
src-libjnif/zip/ioapi.h
src-libjnif/zip/unzip.c
src-libjnif/zip/unzip.h)
add_executable(jnifp
src-jnifp/jnifp.cpp)
add_executable(testunit
src-testunit/testunit.cpp)
add_executable(testjars
src-testjars/testjars.cpp
src-testjars/tests.cpp
src-testjars/tests.hpp)
add_library(testagent STATIC
src-testagent/testagent.cpp
src-testagent/frtlog.hpp
src-testagent/frexception.hpp
src-testagent/frinstr.hpp
src-testagent/frinstrclass.cpp
src-testagent/frinstrclient.cpp
src-testagent/frinstrhandler.cpp
src-testagent/frjvmti.hpp
src-testagent/frlog.hpp
src-testagent/frstamp.cpp
src-testagent/frstamp.hpp
src-testagent/frthread.cpp
src-testagent/frthread.hpp)
target_include_directories(jnif INTERFACE src-libjnif)
target_include_directories(testagent PRIVATE ${JNI_INCLUDE_DIRS})
target_link_libraries(jnif z)
target_link_libraries(jnifp jnif)
target_link_libraries(testunit jnif)
target_link_libraries(testjars jnif)
target_link_libraries(testagent jnif)
#add_custom_command(TARGET testagent POST_BUILD
# COMMAND ${Java_JAVAC_EXECUTABLE} ../src-testagent/frproxy/FrInstrProxy.java)