Add test for bug #455 to 3.3 branch (passes)
[geos.git] / tools / CMakeLists.txt
blob0330b7697db781f1ccf4d1a1469b9aacb0cbcc9d
1 #################################################################################
2 # $Id$
4 # GEOS tools (geos-config) build configuration for CMake build system
6 # Copyright (C) 2009 Mateusz Loskot <mateusz@loskot.net>
8 # This is free software; you can redistribute and/or modify it under
9 # the terms of the GNU Lesser General Public Licence as published
10 # by the Free Software Foundation. 
11 # See the COPYING file for more information.
13 #################################################################################
15 if(UNIX)
17   if(APPLE AND GEOS_ENABLE_MACOSX_FRAMEWORK AND GEOS_ENABLE_MACOSX_FRAMEWORK_UNIXCOMPAT)
18     set(installdest GEOS.framework/Versions/${VERSION_MAJOR}/unix/bin)
19     set(prefix ${CMAKE_INSTALL_PREFIX}/GEOS.framework/Versions/${VERSION_MAJOR}/unix)
20   elseif(APPLE AND GEOS_ENABLE_MACOSX_FRAMEWORK)
21     # just a dummy so installdest not set
22     # want geos-config only for Mac unix build or framework+unixcompat
23   else()
24     set(installdest bin)
25     set(prefix ${CMAKE_INSTALL_PREFIX})
26   endif()
28   set(exec_prefix ${prefix}/bin)
29   set(libdir ${prefix}/lib)
30   
31   if(installdest)
32     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/geos-config.in
33                    ${CMAKE_CURRENT_BINARY_DIR}/geos-config @ONLY)
34   
35     install(FILES ${CMAKE_CURRENT_BINARY_DIR}/geos-config
36       DESTINATION ${installdest}
37       PERMISSIONS
38       OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
39 endif()
41 endif()