Setup and clear of string pool.
[SquirrelJME.git] / nanocoat / frontend / libjvm / CMakeLists.txt
blobb9fa76fe71168d2a225cccaeb94a3f6194b709c6
1 # ---------------------------------------------------------------------------
2 # SquirrelJME
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")
12 # Define library
13 add_library(libJvm SHARED
14         $<TARGET_OBJECTS:BasePIC>
15         $<TARGET_OBJECTS:CorePIC>
16         revProto.c
17         vmInit.c
18         vmNativeLib.c)
20 # Always make this position independent
21 if(SQUIRRELJME_ENABLE_FPIC)
22         set_property(TARGET libJvm
23                 PROPERTY POSITION_INDEPENDENT_CODE ON)
24 endif()
26 # The base SquirrelJME core needs to be built
27 add_dependencies(libJvm
28         CorePIC)
30 # We need to find all of the includes and such
31 target_include_directories(libJvm PUBLIC
32         "${CMAKE_SOURCE_DIR}/include"
33         ${JNI_INCLUDE_DIRS}
34         ${JAVA_INCLUDE_PATH}
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
44         "jvm")
46 # Exports for Windows, etc.
47 squirreljme_target_shared_library_exports(libJvm)