Cherry pick changes from wip-scritchui which should be mainline.
[SquirrelJME.git] / nanocoat / frontend / libjvm / CMakeLists.txt
blob20da31440c95a51da30d632906a43d7d0dda63f7
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 # We need JNI for this to work
10 squirreljme_include("jni.cmake")
12 # Docker is used for testing
13 squirreljme_include("docker.cmake")
15 # Define library
16 add_library(libJvm SHARED
17         $<TARGET_OBJECTS:CorePIC>
18         revProto.c
19         vmInit.c
20         vmNativeLib.c)
22 # Always make this position independent
23 set_property(TARGET libJvm
24         PROPERTY POSITION_INDEPENDENT_CODE ON)
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})
35 # Use a conforming name for the library
36 squirreljme_target_binary_name(libJvm
37         "jvm")