source: branches/maven/projects/jar2lib/src/main/resources/jace/CMakeLists.txt @ 6809

Revision 6809, 1.0 KB checked in by curtis, 9 years ago (diff)

Working version of Jar2Lib.

  • Property svn:eol-style set to native
Line 
1#
2# CMakeLists.txt
3#
4
5# CMake build file for Jace C++ code.
6
7cmake_minimum_required(VERSION 2.8)
8
9project(jace)
10
11include(Prerequisites.cmake)
12
13### build Jace C++ library ###
14
15include_directories("include"
16  "${JAVA_INCLUDE_PATH}" "${JAVA_INCLUDE_PATH2}"
17  "${Boost_INCLUDE_DIR}")
18
19file(GLOB_RECURSE JACE_SRC "source/*.cpp")
20
21add_library(jace SHARED ${JACE_SRC})
22
23# NB: Mac OS X 10.4 and earlier requires .jnilib extension rather than
24#     .dylib when loading native code with System.loadLibrary(String).
25if(APPLE)
26  set_target_properties(jace PROPERTIES SUFFIX ".jnilib")
27endif(APPLE)
28
29# HACK - Make linking to Boost work on Windows systems.
30if(WIN32)
31  target_link_libraries(jace "${JAVA_JVM_LIBRARY}")
32else(WIN32)
33  target_link_libraries(jace
34    "${JAVA_JVM_LIBRARY}" ${Boost_THREAD_LIBRARY_DEBUG})
35endif(WIN32)
36
37if(CMAKE_COMPILER_IS_GNUCXX)
38  set_target_properties(jace PROPERTIES COMPILE_FLAGS "-fpermissive")
39else(CMAKE_COMPILER_IS_GNUCXX)
40  set_target_properties(jace PROPERTIES DEFINE_SYMBOL JACE_EXPORTS)
41endif(CMAKE_COMPILER_IS_GNUCXX)
Note: See TracBrowser for help on using the repository browser.