summaryrefslogtreecommitdiff
blob: 594b6d5cbae8960326c24bfe2574433140c45450 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- gdl-0.9.2.orig/CMakeLists.txt	2011-12-22 20:18:17.000000000 +0000
+++ gdl-0.9.2/CMakeLists.txt	2011-12-24 06:12:08.000000000 +0000
@@ -412,17 +420,17 @@
 	find_package(Libproj4 QUIET)
 	if(LIBPROJ4_FOUND)	
 		set(CMAKE_REQUIRED_LIBRARIES ${LIBPROJ4_LIBRARIES} ${GSL_LIBRARIES} m)
-		check_library_exists("${LIBPROJ4_LIBRARIES}" proj_init "" USE_LIBPROJ4_NEW)
-		if(USE_LIBPROJ4_NEW)
+		check_library_exists("${LIBPROJ4_LIBRARIES}" proj_init "" USE_LIBPROJ4)
+		if(USE_LIBPROJ4)
 			set(USE_LIBPROJ4 1)
-		else(USE_LIBPROJ4_NEW)
-			check_library_exists("${LIBPROJ4_LIBRARIES}" pj_init "" USE_LIBPROJ4)
-			if(NOT USE_LIBPROJ4)
+		else(USE_LIBPROJ4)
+			check_library_exists("${LIBPROJ4_LIBRARIES}" pj_init "" USE_LIBPROJ4_NEW)
+			if(NOT USE_LIBPROJ4_NEW)
 				message(FATAL_ERROR "Libproj4 is required but was not found.\n"
 				"Use -DLIBPROJ4DIR=DIR to specify the Libproj4 directory tree.\n"
 				"Use -DLIBPRJ4=OFF to not use it.")
-			endif(NOT USE_LIBPROJ4)
-		endif(USE_LIBPROJ4_NEW)
+			endif(NOT USE_LIBPROJ4_NEW)
+		endif(USE_LIBPROJ4)
 		include_directories(${LIBPROJ4_INCLUDE_DIR})
 		set(LIBRARIES ${LIBRARIES} ${LIBPROJ4_LIBRARIES})
 		set(CMAKE_REQUIRED_LIBRARIES)