svn-gvsig-desktop / tags / v2_0_0_Build_2024 / libraries / libjni-proj4 / CMakeLists.txt @ 45573
History | View | Annotate | Download (1.66 KB)
1 |
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE) |
---|---|
2 |
|
3 |
IF(WIN32) |
4 |
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 |
ENDIF(WIN32) |
12 |
|
13 |
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 |
|
18 |
# Works around warnings about escaped quotes in ADD_DEFINITIONS |
19 |
# statements. |
20 |
cmake_policy(SET CMP0005 NEW) |
21 |
|
22 |
# 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 |
|
29 |
PROJECT(jproj) |
30 |
|
31 |
SET(JPROJ_VERSION_MAJOR "2") |
32 |
SET(JPROJ_VERSION_MINOR "0") |
33 |
SET(JPROJ_VERSION_PATCH "1") |
34 |
SET(VERSION "${JPROJ_VERSION_MAJOR}.${JPROJ_VERSION_MINOR}.${JPROJ_VERSION_PATCH}") |
35 |
|
36 |
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../build/CMakeModules;${CMAKE_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}") |
37 |
|
38 |
FIND_PACKAGE(DepMan REQUIRED) |
39 |
INCLUDE(GeneralMacros) |
40 |
|
41 |
CONFIGURE_DEFAULTS() |
42 |
|
43 |
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
44 |
SET(CMAKE_INSTALL_PREFIX |
45 |
${DEPMAN_PATH} CACHE PATH "depman path install prefix" FORCE |
46 |
) |
47 |
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) |
48 |
|
49 |
FIND_PACKAGE(JNI REQUIRED) |
50 |
#FIND_PACKAGE(PROJ REQUIRED) |
51 |
|
52 |
ADD_SUBDIRECTORY(src) |
53 |
|
54 |
CONFIGURE_END() |
55 |
|
56 |
|