Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qgis/Quantum-GIS
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jul 6, 2011
2 parents bd495c1 + 49e9a62 commit bff8e54
Show file tree
Hide file tree
Showing 238 changed files with 3,730 additions and 343 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ IF (WITH_BINDINGS)
SET (BINDINGS_GLOBAL_INSTALL FALSE CACHE BOOL "Install bindings to global python directory? (might need root)")
ENDIF (WITH_BINDINGS)

SET (WITH_GLOBE TRUE CACHE BOOL "Determines whether Globe plugin should be built")
IF (WITH_GLOBE)
FIND_PACKAGE(OSGEARTH)
ENDIF (WITH_GLOBE)

# Compile flag. Make it possible to turn it off.
SET (PEDANTIC TRUE CACHE BOOL "Determines if we should compile in pedantic mode.")

Expand Down
101 changes: 101 additions & 0 deletions cmake/FindOSGEARTH.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# This module defines

# OSGEARTH_LIBRARY
# OSGEARTH_FOUND, if false, do not try to link to osg
# OSGEARTH_INCLUDE_DIRS, where to find the headers
# OSGEARTH_INCLUDE_DIR, where to find the source headers
# OSGEARTH_GEN_INCLUDE_DIR, where to find the generated headers

# to use this module, set variables to point to the osg build
# directory, and source directory, respectively
# OSGEARTHDIR or OSGEARTH_SOURCE_DIR: osg source directory, typically OpenSceneGraph
# OSGEARTH_DIR or OSGEARTH_BUILD_DIR: osg build directory, place in which you've
# built osg via cmake

# Header files are presumed to be included like
# #include <osgEarth/Common>
# #include <osgEarth/TileSource>

###### headers ######

MACRO( FIND_OSGEARTH_INCLUDE THIS_OSGEARTH_INCLUDE_DIR THIS_OSGEARTH_INCLUDE_FILE )

FIND_PATH( ${THIS_OSGEARTH_INCLUDE_DIR} ${THIS_OSGEARTH_INCLUDE_FILE}
PATHS
${OSGEARTH_DIR}
$ENV{OSGEARTH_SOURCE_DIR}
$ENV{OSGEARTHDIR}
$ENV{OSGEARTH_DIR}
/usr/local/
/usr/
/sw/ # Fink
/opt/local/ # DarwinPorts
/opt/csw/ # Blastwave
/opt/
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSGEARTH_ROOT]/
~/Library/Frameworks
/Library/Frameworks
PATH_SUFFIXES
/include/
)

ENDMACRO( FIND_OSGEARTH_INCLUDE THIS_OSGEARTH_INCLUDE_DIR THIS_OSGEARTH_INCLUDE_FILE )

FIND_OSGEARTH_INCLUDE( OSGEARTH_GEN_INCLUDE_DIR osgEarth/Common )
FIND_OSGEARTH_INCLUDE( OSGEARTH_INCLUDE_DIR osgEarth/TileSource )

###### libraries ######

MACRO( FIND_OSGEARTH_LIBRARY MYLIBRARY MYLIBRARYNAME )

FIND_LIBRARY(${MYLIBRARY}
NAMES
${MYLIBRARYNAME}
PATHS
${OSGEARTH_DIR}
$ENV{OSGEARTH_BUILD_DIR}
$ENV{OSGEARTH_DIR}
$ENV{OSGEARTHDIR}
$ENV{OSGEARTH_ROOT}
~/Library/Frameworks
/Library/Frameworks
/usr/local
/usr
/sw
/opt/local
/opt/csw
/opt
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;OSGEARTH_ROOT]/lib
/usr/freeware
PATH_SUFFIXES
/lib/
/lib64/
/build/lib/
/build/lib64/
/Build/lib/
/Build/lib64/
)

ENDMACRO(FIND_OSGEARTH_LIBRARY LIBRARY LIBRARYNAME)

FIND_OSGEARTH_LIBRARY( OSGEARTH_LIBRARY osgEarth )
FIND_OSGEARTH_LIBRARY( OSGEARTH_LIBRARY_DEBUG osgEarthd)

FIND_OSGEARTH_LIBRARY( OSGEARTHUTIL_LIBRARY osgEarthUtil )
FIND_OSGEARTH_LIBRARY( OSGEARTHUTIL_LIBRARY_DEBUG osgEarthUtild)

FIND_OSGEARTH_LIBRARY( OSGEARTHFEATURES_LIBRARY osgEarthFeatures )
FIND_OSGEARTH_LIBRARY( OSGEARTHFEATURES_LIBRARY_DEBUG osgEarthFeaturesd)

FIND_OSGEARTH_LIBRARY( OSGEARTHSYMBOLOGY_LIBRARY osgEarthSymbology )
FIND_OSGEARTH_LIBRARY( OSGEARTHSYMBOLOGY_LIBRARY_DEBUG osgEarthSymbologyd )


SET( OSGEARTH_FOUND "NO" )
IF( OSGEARTH_LIBRARY AND OSGEARTH_INCLUDE_DIR )
SET( OSGEARTH_FOUND "YES" )
SET( OSGEARTH_INCLUDE_DIRS ${OSGEARTH_INCLUDE_DIR} ${OSGEARTH_GEN_INCLUDE_DIR} )
GET_FILENAME_COMPONENT( OSGEARTH_LIBRARIES_DIR ${OSGEARTH_LIBRARY} PATH )
ENDIF( OSGEARTH_LIBRARY AND OSGEARTH_INCLUDE_DIR )


62 changes: 31 additions & 31 deletions cmake/FindQGIS.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Once run this will define:
##
## Once run this will define:
##
## QGIS_FOUND = system has QGIS lib
##
## QGIS_CORE_LIBRARY = full path to the CORE library
## QGIS_GUI_LIBRARY = full path to the GUI library
## QGIS_ANALYSIS_LIBRARY = full path to the ANALYSIS library
## QGIS_PLUGIN_DIR = full path to where QGIS plugins are installed
## QGIS_INCLUDE_DIR = where to find headers
## QGIS_INCLUDE_DIR = where to find headers
##
## Tim Sutton

Expand All @@ -20,9 +20,9 @@ IF(WIN32)
"$ENV{PROGRAMFILES}/Quantum GIS/plugins"
)
FIND_PATH(QGIS_INCLUDE_DIR
NAMES qgsapplication.h
NAMES qgsapplication.h
PATHS
"$ENV{PROGRAMFILES}/Quantum GIS/include"
"$ENV{PROGRAMFILES}/Quantum GIS/include"
)
FIND_LIBRARY(QGIS_CORE_LIBRARY
NAMES qgis_core
Expand All @@ -43,41 +43,41 @@ IF(WIN32)
"$ENV{OSGEO4W_ROOT}/apps/qgis/plugins"
"$ENV{PROGRAMFILES}/Quantum GIS/plugins"
)
FIND_PATH(QGIS_INCLUDE_DIR
NAMES qgsapplication.h
FIND_PATH(QGIS_INCLUDE_DIR
NAMES qgsapplication.h
PATHS
"$ENV{INCLUDE}"
"$ENV{LIB_DIR}/include/qgis"
"$ENV{INCLUDE}"
"$ENV{LIB_DIR}/include/qgis"
"$ENV{OSGEO4W_ROOT}/include"
"$ENV{PROGRAMFILES}/Quantum GIS/include"
)
FIND_LIBRARY(QGIS_CORE_LIBRARY
NAMES qgis_core
PATHS
"$ENV{LIB_DIR}/lib/"
"$ENV{LIB}"
PATHS
"$ENV{LIB_DIR}/lib/"
"$ENV{LIB}"
"$ENV{OSGEO4W_ROOT}/lib"
"$ENV{PROGRAMFILES}/Quantum GIS/lib"
)
FIND_LIBRARY(QGIS_GUI_LIBRARY
NAMES qgis_gui
PATHS
"$ENV{LIB_DIR}"
"$ENV{LIB}"
PATHS
"$ENV{LIB_DIR}"
"$ENV{LIB}"
"$ENV{OSGEO4W_ROOT}/lib"
"$ENV{PROGRAMFILES}/Quantum GIS/lib"
)
FIND_LIBRARY(QGIS_ANALYSIS_LIBRARY
NAMES qgis_analysis
PATHS
"$ENV{LIB_DIR}"
"$ENV{LIB}"
PATHS
"$ENV{LIB_DIR}"
"$ENV{LIB}"
"$ENV{OSGEO4W_ROOT}/lib"
"$ENV{PROGRAMFILES}/Quantum GIS/lib"
)
ENDIF (MSVC)
ELSE(WIN32)
IF(UNIX)
IF(UNIX)
# try to use bundle on mac
SET (QGIS_MAC_PATH /Applications/QGIS.app/Contents)
#MESSAGE("Searching for QGIS in /usr/bin; /usr/local/bin")
Expand All @@ -88,25 +88,25 @@ ELSE(WIN32)
/usr/lib/qgis
/usr/local/lib/qgis/plugins
${QGIS_MAC_PATH}/PlugIns/qgis
"$ENV{LIB_DIR}/lib/qgis/plugins"
"$ENV{LIB_DIR}/lib/qgis"
"$ENV{LIB_DIR}/lib/qgis/plugins"
"$ENV{LIB_DIR}/lib/qgis"
)
FIND_PATH(QGIS_INCLUDE_DIR
NAMES qgis.h
NAMES qgis.h
PATHS
/usr/include/qgis
/usr/local/include/qgis
${QGIS_MAC_PATH}/Frameworks/qgis_core.framework/Headers
"$ENV{LIB_DIR}/include/qgis"
"$ENV{LIB_DIR}/include/qgis"
)
# also get other frameworks' headers folders on OS X
IF (APPLE)
FIND_PATH(QGIS_GUI_INCLUDE_DIR
NAMES qgisgui.h
NAMES qgisgui.h
PATHS ${QGIS_MAC_PATH}/Frameworks/qgis_gui.framework/Headers
)
FIND_PATH(QGIS_ANALYSIS_INCLUDE_DIR
NAMES qgsinterpolator.h
NAMES qgsinterpolator.h
PATHS ${QGIS_MAC_PATH}/Frameworks/qgis_analysis.framework/Headers
)
SET(QGIS_INCLUDE_DIR
Expand All @@ -117,30 +117,30 @@ ELSE(WIN32)
ENDIF (APPLE)
FIND_LIBRARY(QGIS_CORE_LIBRARY
NAMES qgis_core
PATHS
PATHS
/usr/lib64
/usr/lib
/usr/local/lib
${QGIS_MAC_PATH}/Frameworks
"$ENV{LIB_DIR}/lib/"
"$ENV{LIB_DIR}/lib/"
)
FIND_LIBRARY(QGIS_GUI_LIBRARY
NAMES qgis_gui
PATHS
PATHS
/usr/lib64
/usr/lib
/usr/local/lib
${QGIS_MAC_PATH}/Frameworks
"$ENV{LIB_DIR}/lib/"
"$ENV{LIB_DIR}/lib/"
)
FIND_LIBRARY(QGIS_ANALYSIS_LIBRARY
NAMES qgis_analysis
PATHS
PATHS
/usr/lib64
/usr/lib
/usr/local/lib
${QGIS_MAC_PATH}/Frameworks
"$ENV{LIB_DIR}/lib/"
"$ENV{LIB_DIR}/lib/"
)
ENDIF(UNIX)
ENDIF(WIN32)
Expand Down
26 changes: 13 additions & 13 deletions images/icons/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

FILE (GLOB IMAGES *.png)
INSTALL (FILES ${IMAGES}
DESTINATION ${QGIS_DATA_DIR}/images/icons)

IF(MSVC)
INSTALL(FILES qgis.ico DESTINATION ${CMAKE_INSTALL_PREFIX}/icons)
ENDIF(MSVC)

# OS X app/doc icons
IF (APPLE)
ADD_SUBDIRECTORY(mac)
ENDIF (APPLE)

FILE (GLOB IMAGES *.png)
INSTALL (FILES ${IMAGES}
DESTINATION ${QGIS_DATA_DIR}/images/icons)

IF(MSVC)
INSTALL(FILES qgis.ico DESTINATION ${CMAKE_INSTALL_PREFIX}/icons)
ENDIF(MSVC)

# OS X app/doc icons
IF (APPLE)
ADD_SUBDIRECTORY(mac)
ENDIF (APPLE)
File renamed without changes.