source: trunk/projects/jar2lib/src/main/resources/CMakeLists.vm @ 7635

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

Add ability to specify additional source files.

Also clean up the Jar2Lib source code a bit.

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
15include_directories(include "proxies/include" "jace/include"
16  "${JAVA_INCLUDE_PATH}" "${JAVA_INCLUDE_PATH2}" "${Boost_INCLUDE_DIR}")
17
18file(GLOB_RECURSE PROJECT_SRC "proxies/source/*.cpp")
19
20add_library($projectId SHARED ${PROJECT_SRC})
21
22target_link_libraries($projectId jace)
23
24if(CMAKE_COMPILER_IS_GNUCXX)
25  set_target_properties($projectId PROPERTIES
26    COMPILE_FLAGS "-fpermissive")
27else(CMAKE_COMPILER_IS_GNUCXX)
28  set_target_properties($projectId PROPERTIES
29    DEFINE_SYMBOL JACE_PROXY_EXPORTS)
30endif(CMAKE_COMPILER_IS_GNUCXX)
31
32target_link_libraries($projectId jace)
33#foreach ($sourceFile in $sourceFiles)
34
35#set ($execName = $q.simpleName($sourceFile))
36#set ($sourceName = $sourceFile.getName())
37add_executable($execName source/$sourceName)
38target_link_libraries($execName $projectId jace "${JAVA_JVM_LIBRARY}")
39#end##foreach $sourceFile
Note: See TracBrowser for help on using the repository browser.