Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/runtime/j9vm/CMakeLists.txt
5985 views
1
################################################################################
2
# Copyright (c) 2017, 2021 IBM Corp. and others
3
#
4
# This program and the accompanying materials are made available under
5
# the terms of the Eclipse Public License 2.0 which accompanies this
6
# distribution and is available at https://www.eclipse.org/legal/epl-2.0/
7
# or the Apache License, Version 2.0 which accompanies this distribution and
8
# is available at https://www.apache.org/licenses/LICENSE-2.0.
9
#
10
# This Source Code may also be made available under the following
11
# Secondary Licenses when the conditions for such availability set
12
# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
13
# General Public License, version 2 with the GNU Classpath
14
# Exception [1] and GNU General Public License, version 2 with the
15
# OpenJDK Assembly Exception [2].
16
#
17
# [1] https://www.gnu.org/software/classpath/license.html
18
# [2] http://openjdk.java.net/legal/assembly-exception.html
19
#
20
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
21
################################################################################
22
23
set(OMR_ENHANCED_WARNINGS OFF)
24
25
add_tracegen(j9scar.tdf)
26
27
# Note we add all the actual sources to this interface library.
28
# This is so that we can reuse them without having to explicitly re-list all the files.
29
j9vm_add_library(jvm_common INTERFACE)
30
31
target_sources(jvm_common INTERFACE
32
${CMAKE_CURRENT_SOURCE_DIR}/j7verify.c
33
${CMAKE_CURRENT_SOURCE_DIR}/j7vmi.c
34
${CMAKE_CURRENT_SOURCE_DIR}/j8vmi.c
35
${CMAKE_CURRENT_SOURCE_DIR}/j9memcategories.c
36
${CMAKE_CURRENT_SOURCE_DIR}/java11vmi.c
37
${CMAKE_CURRENT_SOURCE_DIR}/javanextvmi.c
38
${CMAKE_CURRENT_SOURCE_DIR}/jvm.c
39
${CMAKE_CURRENT_SOURCE_DIR}/vmi.c
40
${CMAKE_CURRENT_SOURCE_DIR}/asgct.cpp
41
)
42
43
target_link_libraries(jvm_common
44
INTERFACE
45
j9vm_interface
46
j9vm_gc_includes
47
48
j9exelib
49
j9utilcore
50
j9avl
51
j9hashtable
52
j9pool
53
54
${CMAKE_DL_LIBS}
55
${OMR_PLATFORM_THREAD_LIBRARY}
56
)
57
58
target_include_directories(jvm_common
59
INTERFACE
60
${CMAKE_CURRENT_BINARY_DIR}
61
# TODO we have to repeat ../include because of duplication of vmi.h
62
../include
63
../jcl/
64
)
65
66
j9vm_add_library(jvm SHARED ${CMAKE_CURRENT_BINARY_DIR}/ut_j9scar.c)
67
target_link_libraries(jvm
68
PRIVATE
69
jvm_common
70
j9util
71
)
72
73
if(OMR_OS_WINDOWS)
74
target_link_libraries(jvm PRIVATE ws2_32)
75
endif()
76
add_dependencies(jvm omrgc_hookgen)
77
include(exports.cmake)
78
79
install(
80
TARGETS jvm
81
LIBRARY DESTINATION ${j9vm_SOURCE_DIR}
82
RUNTIME DESTINATION ${j9vm_SOURCE_DIR}
83
)
84
85