source: branches/maven/projects/jar2lib/src/main/resources/CMakeLists.vm @ 6806

Revision 6806, 1.6 KB checked in by curtis, 9 years ago (diff)

Initial version of Jar2Lib implementation.

Line 
1#
2# CMakeLists.txt
3#
4$headerBlock
5# CMake build file for $projectName.
6
7cmake_minimum_required(VERSION 2.8)
8
9project($projectId)
10
11include(jace/Prerequisites.cmake)
12
13add_subdirectory(jace)
14
15# TODO - eliminate use of JACE_DIR since we are bundling the source directly
16#message(STATUS "-- Jace:")
17\#set(JACE_DIR NOTFOUND CACHE PATH
18#  "The path to toplevel directory of your Jace checkout")
19\#if(IS_DIRECTORY "${JACE_DIR}")
20#  message(STATUS "jace root     : ${JACE_DIR}")
21\#else(IS_DIRECTORY "${JACE_DIR}")
22#  message(FATAL_ERROR "Cannot build without Jace. Please set JACE_DIR.")
23#endif(IS_DIRECTORY "${JACE_DIR}")
24
25# -- build $projectName --
26
27include_directories(include
28  "proxies/include" "${JACE_CPP_DIR}/include"
29  "${JAVA_INCLUDE_PATH}" "${JAVA_INCLUDE_PATH2}" "${Boost_INCLUDE_DIR}")
30
31file(GLOB_RECURSE PROJECT_SRC "proxies/source/*.cpp")
32
33add_library($projectId SHARED ${PROJECT_SRC})
34
35target_link_libraries($projectId jace)
36
37if(CMAKE_COMPILER_IS_GNUCXX)
38  set_target_properties($projectId PROPERTIES
39    COMPILE_FLAGS "-fpermissive")
40else(CMAKE_COMPILER_IS_GNUCXX)
41  set_target_properties($projectId PROPERTIES
42    DEFINE_SYMBOL JACE_PROXY_EXPORTS)
43endif(CMAKE_COMPILER_IS_GNUCXX)
44
45target_link_libraries($projectId jace)
46
47# -- build some examples for testing $projectId --
48
49# TODO - eliminate hard-coded sources below, in favor of user-specified option
50
51# add_executable(showinf source/showinf.cpp)
52# target_link_libraries(showinf $projectId jace "${JAVA_JVM_LIBRARY}")
53
54# add_executable(minimum_writer source/minimum_writer.cpp)
55# target_link_libraries(minimum_writer $projectId jace "${JAVA_JVM_LIBRARY}")
Note: See TracBrowser for help on using the repository browser.