1 # ---------------------------------------------------------------------------
3 # Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
4 # ---------------------------------------------------------------------------
5 # SquirrelJME is under the Mozilla Public License Version 2.0.
6 # See license.mkd for licensing and copyright information.
7 # ---------------------------------------------------------------------------
9 # Docker is used for testing
10 squirreljme_include("docker.cmake")
13 add_library(libJvm SHARED
14 $<TARGET_OBJECTS:BasePIC>
15 $<TARGET_OBJECTS:CorePIC>
20 # Always make this position independent
21 if(SQUIRRELJME_ENABLE_FPIC)
22 set_property(TARGET libJvm
23 PROPERTY POSITION_INDEPENDENT_CODE ON)
26 # The base SquirrelJME core needs to be built
27 add_dependencies(libJvm
30 # We need to find all of the includes and such
31 target_include_directories(libJvm PUBLIC
32 "${CMAKE_SOURCE_DIR}/include"
35 ${JAVA_INCLUDE_PATH2})
37 # Libraries needed to be linked with for the DyLib to function
38 target_link_libraries(libJvm PUBLIC
39 ${SQUIRRELJME_LINK_LIBRARIES_Base}
40 ${SQUIRRELJME_LINK_LIBRARIES_Core})
42 # Use a conforming name for the library
43 squirreljme_target_binary_name(libJvm
46 # Exports for Windows, etc.
47 squirreljme_target_shared_library_exports(libJvm)