svn-gvsig-desktop / tags / v2_0_0_Build_2024 / libraries / libjni-gdal / CMakeLists.txt @ 45573
History | View | Annotate | Download (1.67 KB)
1 | 27485 | rgaitan | set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) |
---|---|---|---|
2 | 17679 | maquerol | |
3 | IF(WIN32) |
||
4 | 27485 | rgaitan | CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR) |
5 | ELSE(WIN32) |
||
6 | IF(APPLE) |
||
7 | CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR) |
||
8 | ELSE(APPLE) |
||
9 | CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR) |
||
10 | ENDIF(APPLE) |
||
11 | 17679 | maquerol | ENDIF(WIN32) |
12 | |||
13 | 27485 | rgaitan | if(COMMAND cmake_policy) |
14 | # Works around warnings libraries linked against that don't |
||
15 | # have absolute paths (e.g. -lpthreads) |
||
16 | cmake_policy(SET CMP0003 NEW) |
||
17 | 19309 | maquerol | |
18 | 27485 | rgaitan | # Works around warnings about escaped quotes in ADD_DEFINITIONS |
19 | # statements. |
||
20 | cmake_policy(SET CMP0005 NEW) |
||
21 | 20434 | maquerol | |
22 | 27485 | rgaitan | # cmake-2.6.1 introduces policy cmp0008 decide how to treat full path libraries that do not appear to be valid library file names |
23 | # quote from cvslog "Such libraries worked by accident in the VS IDE and Xcode generators in CMake 2.4 and below." |
||
24 | if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} GREATER 4 AND ${CMAKE_PATCH_VERSION} GREATER 0) |
||
25 | cmake_policy(SET CMP0008 OLD) |
||
26 | endif() |
||
27 | endif() |
||
28 | 17679 | maquerol | |
29 | 27485 | rgaitan | PROJECT(jgdal) |
30 | 17679 | maquerol | |
31 | 27485 | rgaitan | SET(JGDAL_VERSION_MAJOR "2") |
32 | SET(JGDAL_VERSION_MINOR "0") |
||
33 | 32177 | nbrodin | SET(JGDAL_VERSION_PATCH "1") |
34 | |||
35 | 27485 | rgaitan | SET(VERSION "${JGDAL_VERSION_MAJOR}.${JGDAL_VERSION_MINOR}.${JGDAL_VERSION_PATCH}") |
36 | 17679 | maquerol | |
37 | 27485 | rgaitan | SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../build/CMakeModules;${CMAKE_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}") |
38 | 17679 | maquerol | |
39 | 27485 | rgaitan | FIND_PACKAGE(DepMan REQUIRED) |
40 | INCLUDE(GeneralMacros) |
||
41 | 17679 | maquerol | |
42 | 27485 | rgaitan | CONFIGURE_DEFAULTS() |
43 | 17679 | maquerol | |
44 | 27562 | rgaitan | IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
45 | SET(CMAKE_INSTALL_PREFIX |
||
46 | ${DEPMAN_PATH} CACHE PATH "depman path install prefix" FORCE |
||
47 | ) |
||
48 | ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
||
49 | 17679 | maquerol | |
50 | 27485 | rgaitan | FIND_PACKAGE(JNI REQUIRED) |
51 | FIND_PACKAGE(GDAL REQUIRED) |
||
52 | 17679 | maquerol | |
53 | 27485 | rgaitan | ADD_SUBDIRECTORY(src/main/native) |
54 | 17679 | maquerol | |
55 | 27485 | rgaitan | CONFIGURE_END() |
56 | 17679 | maquerol |