Path: blob/master/sourcetools/j9constantpool/CMakeLists.txt
5986 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################################################################################2122# CMake doesn't properly handle directory separators when building in cygwin23# but using a windows java binary. IE it uses ':' as a directory separator,24# rather than required ';'25# Note: this isn't required for JDKs after JDK11 as fixpath will convert the path separators for us.2627# WIN32 will be true when the build is targeting windows, but CMAKE_HOST_WIN32 is false on cygwin28if((WIN32 AND NOT CMAKE_HOST_WIN32) AND (NOT JAVA_SPEC_VERSION GREATER 11))29# put "-cp <Path_to_objectmodel_jar>" into a text file we will pass in with '@file'30file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cygwin_classpath" CONTENT "-cp\n$<TARGET_PROPERTY:objectmodel,JAR_FILE>\n")31set(CYGWIN_CP "@${CMAKE_CURRENT_BINARY_DIR}/cygwin_classpath")32else()33set(CYGWIN_CP)34endif()3536add_jar(j9vmcp37SOURCES38com/ibm/oti/VMCPTool/ClassRef.java39com/ibm/oti/VMCPTool/CmakeFlagInfo.java40com/ibm/oti/VMCPTool/ConstantPool.java41com/ibm/oti/VMCPTool/ConstantPoolItem.java42com/ibm/oti/VMCPTool/ConstantPoolStream.java43com/ibm/oti/VMCPTool/Constants.java44com/ibm/oti/VMCPTool/FieldRef.java45com/ibm/oti/VMCPTool/InterfaceMethodRef.java46com/ibm/oti/VMCPTool/IFlagInfo.java47com/ibm/oti/VMCPTool/J9UTF8.java48com/ibm/oti/VMCPTool/Main.java49com/ibm/oti/VMCPTool/NameAndSignature.java50com/ibm/oti/VMCPTool/PrimaryItem.java51com/ibm/oti/VMCPTool/SpecialMethodRef.java52com/ibm/oti/VMCPTool/StaticFieldRef.java53com/ibm/oti/VMCPTool/StaticMethodRef.java54com/ibm/oti/VMCPTool/UmaFlagInfo.java55com/ibm/oti/VMCPTool/Util.java56com/ibm/oti/VMCPTool/VirtualMethodRef.java57${CYGWIN_CP}58INCLUDE_JARS objectmodel59)606162