Revision 33798

View differences:

tags/v2_0_0_Build_2020/libraries/libjni-proj4/CMakeModules/FindPROJ.cmake
1
# Locate proj
2
# This module defines
3
# PROJ_LIBRARY
4
# PROJ_FOUND, if false, do not try to link to proj 
5
# PROJ_INCLUDE_DIR, where to find the headers
6
#
7
# $PROJDIR is an environment variable that would
8
# correspond to the ./configure --prefix=$PROJ_DIR
9
# used in building proj.
10
#
11
# Created by Eric Wing. I'm not a proj user, but OpenSceneGraph uses it 
12
# for osgTerrain so I whipped this module together for completeness.
13
# I actually don't know the conventions or where files are typically
14
# placed in distros.
15
# Any real proj users are encouraged to correct this (but please don't
16
# break the OS X framework stuff when doing so which is what usually seems 
17
# to happen).
18

  
19
# This makes the presumption that you are include proj.h like
20
# #include "proj.h"
21

  
22
FIND_PATH(PROJ_INCLUDE_DIR proj_api.h
23
  PATHS
24
  $ENV{PROJ_DIR}
25
  NO_DEFAULT_PATH
26
    PATH_SUFFIXES include
27
)
28

  
29
FIND_PATH(PROJ_INCLUDE_DIR proj_api.h
30
    PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
31
    NO_DEFAULT_PATH
32
    PATH_SUFFIXES include
33
)
34

  
35
FIND_PATH(PROJ_INCLUDE_DIR proj_api.h
36
  PATHS
37
  ~/Library/Frameworks/proj.framework/Headers
38
  /Library/Frameworks/proj.framework/Headers
39
  /usr/local/include/proj
40
  /usr/local/include/PROJ
41
  /usr/local/include
42
  /usr/include/proj
43
  /usr/include/PROJ
44
  /usr/include
45
  /sw/include/proj 
46
  /sw/include/PROJ 
47
  /sw/include # Fink
48
  /opt/local/include/proj
49
  /opt/local/include/PROJ
50
  /opt/local/include # DarwinPorts
51
  /opt/csw/include/proj
52
  /opt/csw/include/PROJ
53
  /opt/csw/include # Blastwave
54
  /opt/include/proj
55
  /opt/include/PROJ
56
  /opt/include
57
)
58

  
59
MARK_AS_ADVANCED(PROJ_INCLUDE_DIR)
60

  
61
FIND_LIBRARY(PROJ_LIBRARY 
62
  NAMES proj PROJ
63
  PATHS
64
  $ENV{PROJ_DIR}
65
  NO_DEFAULT_PATH
66
  PATH_SUFFIXES lib64 lib
67
)
68
FIND_LIBRARY(PROJ_LIBRARY 
69
  NAMES proj PROJ
70
  PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
71
    NO_DEFAULT_PATH
72
    PATH_SUFFIXES lib64 lib
73
)
74
FIND_LIBRARY(PROJ_LIBRARY 
75
  NAMES proj PROJ
76
  PATHS
77
    ~/Library/Frameworks
78
    /Library/Frameworks
79
    /usr/local
80
    /usr
81
    /sw
82
    /opt/local
83
    /opt/csw
84
    /opt
85
    /usr/freeware
86
    [HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;PROJ_ROOT]/lib
87
  PATH_SUFFIXES lib64 lib
88
)
89

  
90
MARK_AS_ADVANCED(PROJ_LIBRARY)
91

  
92
SET(PROJ_FOUND "NO")
93
IF(PROJ_LIBRARY AND PROJ_INCLUDE_DIR)
94
  SET(PROJ_FOUND "YES")
95
  SET(PROJ_LIBRARY_DEBUG ${PROJ_LIBRARY})
96
ENDIF(PROJ_LIBRARY AND PROJ_INCLUDE_DIR)
97

  
98

  
99

  
tags/v2_0_0_Build_2020/libraries/libjni-proj4/pom.xml
1
<project xmlns="http://maven.apache.org/POM/4.0.0"
2
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4
	<modelVersion>4.0.0</modelVersion>
5
	<groupId>org.gvsig</groupId>
6
	<artifactId>org.gvsig.jproj</artifactId>
7
	<packaging>jar</packaging>
8
	<version>2.0.1-SNAPSHOT</version>
9
	<name>libjni-proj4</name>
10
	<parent>
11
		<groupId>org.gvsig</groupId>
12
		<artifactId>gvsig-base-library-jni-pom</artifactId>
13
		<version>2.0-SNAPSHOT</version>
14
	</parent>
15
	<properties>
16
		<build-dir>${basedir}/../build</build-dir>
17
	</properties>
18
	<build>
19
		<plugins>
20
			<!-- TODO: MAKE TESTS WORK AND REMOVE THIS OPTION -->
21
			<plugin>
22
				<groupId>org.apache.maven.plugins</groupId>
23
				<artifactId>maven-surefire-plugin</artifactId>
24
				<configuration>
25
					<skipTests>true</skipTests>
26
				</configuration>
27
			</plugin>
28
		</plugins>
29
	</build>
30
	<profiles>
31
		<profile>
32
			<id>windows-profile</id>
33
			<activation>
34
				<os>
35
					<family>windows</family>
36
				</os>
37
			</activation>
38
			<properties>
39
				<build-dir>${basedir}\..\build</build-dir>
40
			</properties>
41
		</profile>
42
		<profile>
43
			<id>linux-profile</id>
44
			<activation>
45
				<os>
46
					<family>linux</family>
47
				</os>
48
			</activation>
49
		</profile>
50
		<profile>
51
			<id>mac-profile</id>
52
			<activation>
53
				<os>
54
					<family>mac</family>
55
				</os>
56
			</activation>
57
		</profile>
58
	</profiles>
59
</project>
60

  
tags/v2_0_0_Build_2020/libraries/libjni-proj4/CMakeLists.txt
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

  
tags/v2_0_0_Build_2020/libraries/libjni-proj4/src/CMakeLists.txt
1
set(LIB_NAME crsjniproj)
2

  
3
FILE(GLOB SOURCES "*.c*")
4

  
5
include_directories(
6
	${CMAKE_SOURCE_DIR}/include
7
	${JAVA_INCLUDE_PATH}
8
	${JAVA_INCLUDE_PATH2}
9
	#${PROJ_INCLUDE_DIR}
10
)
11

  
12
SET(LIBRARIES_OPTIMIZED 
13
    #${PROJ_LIBRARY}
14
)
15

  
16
SET(LIBRARIES_DEBUG
17
    #${PROJ_LIBRARY}
18
)
19

  
20
SETUP_JNILIB(${LIB_NAME})
21

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff