Path: blob/master/runtime/j9vm/CMakeLists.txt
12861 views
################################################################################1# Copyright (c) 2017, 2021 IBM Corp. and others2#3# This program and the accompanying materials are made available under4# the terms of the Eclipse Public License 2.0 which accompanies this5# distribution and is available at https://www.eclipse.org/legal/epl-2.0/6# or the Apache License, Version 2.0 which accompanies this distribution and7# is available at https://www.apache.org/licenses/LICENSE-2.0.8#9# This Source Code may also be made available under the following10# Secondary Licenses when the conditions for such availability set11# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12# General Public License, version 2 with the GNU Classpath13# Exception [1] and GNU General Public License, version 2 with the14# OpenJDK Assembly Exception [2].15#16# [1] https://www.gnu.org/software/classpath/license.html17# [2] http://openjdk.java.net/legal/assembly-exception.html18#19# 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-exception20################################################################################2122set(OMR_ENHANCED_WARNINGS OFF)2324add_tracegen(j9scar.tdf)2526# Note we add all the actual sources to this interface library.27# This is so that we can reuse them without having to explicitly re-list all the files.28j9vm_add_library(jvm_common INTERFACE)2930target_sources(jvm_common INTERFACE31${CMAKE_CURRENT_SOURCE_DIR}/j7verify.c32${CMAKE_CURRENT_SOURCE_DIR}/j7vmi.c33${CMAKE_CURRENT_SOURCE_DIR}/j8vmi.c34${CMAKE_CURRENT_SOURCE_DIR}/j9memcategories.c35${CMAKE_CURRENT_SOURCE_DIR}/java11vmi.c36${CMAKE_CURRENT_SOURCE_DIR}/javanextvmi.c37${CMAKE_CURRENT_SOURCE_DIR}/jvm.c38${CMAKE_CURRENT_SOURCE_DIR}/vmi.c39${CMAKE_CURRENT_SOURCE_DIR}/asgct.cpp40)4142target_link_libraries(jvm_common43INTERFACE44j9vm_interface45j9vm_gc_includes4647j9exelib48j9utilcore49j9avl50j9hashtable51j9pool5253${CMAKE_DL_LIBS}54${OMR_PLATFORM_THREAD_LIBRARY}55)5657target_include_directories(jvm_common58INTERFACE59${CMAKE_CURRENT_BINARY_DIR}60# TODO we have to repeat ../include because of duplication of vmi.h61../include62../jcl/63)6465j9vm_add_library(jvm SHARED ${CMAKE_CURRENT_BINARY_DIR}/ut_j9scar.c)66target_link_libraries(jvm67PRIVATE68jvm_common69j9util70)7172if(OMR_OS_WINDOWS)73target_link_libraries(jvm PRIVATE ws2_32)74endif()75add_dependencies(jvm omrgc_hookgen)76include(exports.cmake)7778install(79TARGETS jvm80LIBRARY DESTINATION ${j9vm_SOURCE_DIR}81RUNTIME DESTINATION ${j9vm_SOURCE_DIR}82)838485