Skip to content
Permalink
Browse files

For msvc cmake rules make all the include, app and lib paths relative…

… to the environment dir %LIB_DIR% so that the libs can be anywhere on your filesystem.

git-svn-id: http://svn.osgeo.org/qgis/trunk@7261 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Oct 11, 2007
1 parent 1e51178 commit dcd52f1281d0e897985ad91c0bbca8163ba02d63
Showing with 31 additions and 18 deletions.
  1. +1 −1 cmake/Bison.cmake
  2. +2 −2 cmake/FindExpat.cmake
  3. +9 −2 cmake/FindGDAL.cmake
  4. +6 −4 cmake/FindGEOS.cmake
  5. +2 −3 cmake/FindGSL.cmake
  6. +4 −2 cmake/FindProj.cmake
  7. +4 −3 cmake/FindSqlite3.cmake
  8. +3 −1 cmake/Flex.cmake
@@ -4,7 +4,7 @@
MACRO(FIND_BISON)
IF(NOT BISON_EXECUTABLE)
IF (MSVC)
FIND_PROGRAM(BISON_EXECUTABLE "c:/dev/cpp/bison/bin/bison.exe")
FIND_PROGRAM(BISON_EXECUTABLE "$ENV{LIB_DIR}/bin/bison.exe")
ELSE (MSVC)
FIND_PROGRAM(BISON_EXECUTABLE bison)
ENDIF (MSVC)
@@ -11,15 +11,15 @@
FIND_PATH(EXPAT_INCLUDE_DIR expat.h
/usr/local/include
/usr/include
"$ENV{LIB_DIR}/include/expat"
c:/msys/local/include
"C:/dev/cpp/Expat 2.0.1/Source/Lib"
)
#libexpat needed for msvc version
FIND_LIBRARY(EXPAT_LIBRARY NAMES expat libexpat PATHS
/usr/local/lib
/usr/lib
"$ENV{LIB_DIR}/lib"
c:/msys/local/lib
"C:/dev/cpp/Expat 2.0.1/Bin"
)

IF (EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY)
@@ -17,8 +17,15 @@ IF(WIN32)
ENDIF (MINGW)

IF (MSVC)
SET (GDAL_INCLUDE_DIR C:/dev/cpp/gdal/gcore;C:/dev/cpp/gdal/port;C:/dev/cpp/gdal/ogr;C:/dev/cpp/gdal/alg;C:/dev/cpp/gdal/ogr/ogrsf_frmts CACHE STRING INTERNAL)
SET (GDAL_LIBRARY C:/dev/cpp/gdal/gdal.lib;odbc32;odbccp32 CACHE STRING INTERNAL)
SET (
GDAL_INCLUDE_DIR
"$ENV{LIB_DIR}/include/gdal"
CACHE STRING INTERNAL
)
SET (
GDAL_LIBRARY
"$ENV{LIB_DIR}/lib/gdal.lib";odbc32;odbccp32
CACHE STRING INTERNAL)
ENDIF (MSVC)


@@ -10,17 +10,19 @@
FIND_PATH(GEOS_INCLUDE_DIR geos.h
/usr/local/include
/usr/include
c:/msys/local/include
#MSVC
C:/dev/cpp/geos-2.2.1/source/headers
"$ENV{LIB_DIR}/include"
#mingw
c:/msys/local/include
)

FIND_LIBRARY(GEOS_LIBRARY NAMES geos PATHS
/usr/local/lib
/usr/lib
c:/msys/local/lib
#MSVC
C:/dev/cpp/geos-2.2.1/source
"$ENV{LIB_DIR}/lib"
#mingw
c:/msys/local/lib
)

IF (GEOS_INCLUDE_DIR AND GEOS_LIBRARY)
@@ -26,8 +26,7 @@
IF(WIN32)

SET(GSL_MINGW_PREFIX "c:/msys/local" )
SET(GSL_MSVC_PREFIX "C:/dev/cpp/gsl" )

SET(GSL_MSVC_PREFIX "$ENV{LIB_DIR}")
FIND_LIBRARY(GSL_LIB gsl PATHS
${GSL_MINGW_PREFIX}/lib
${GSL_MSVC_PREFIX}/lib
@@ -38,7 +37,7 @@ IF(WIN32)
${GSL_MSVC_PREFIX}/lib
)

FIND_PATH(GSL_INCLUDE_DIR gsl/gsl_version.h
FIND_PATH(GSL_INCLUDE_DIR gsl/gsl_blas.h
${GSL_PREFIX}/include
${GSL_MSVC_PREFIX}/include
)
@@ -10,15 +10,17 @@
FIND_PATH(PROJ_INCLUDE_DIR proj_api.h
/usr/local/include
/usr/include
#msvc
"$ENV{LIB_DIR}/include/proj"
#mingw
c:/msys/local/include
C:/dev/cpp/proj-4.5.0/src
)

FIND_LIBRARY(PROJ_LIBRARY NAMES proj PATHS
/usr/local/lib
/usr/lib
"$ENV{LIB_DIR}/lib"
c:/msys/local/lib
C:/dev/cpp/proj-4.5.0/src
)

IF (PROJ_INCLUDE_DIR AND PROJ_LIBRARY)
@@ -10,17 +10,18 @@
FIND_PATH(SQLITE3_INCLUDE_DIR sqlite3.h
/usr/local/include
/usr/include
c:/msys/local/include
#msvc
c:/dev/cpp/sqlite3
"$ENV{LIB_DIR}/include/sqlite"
#mingw
c:/msys/local/include
)

FIND_LIBRARY(SQLITE3_LIBRARY NAMES sqlite3 PATHS
/usr/local/lib
/usr/lib
c:/msys/local/lib
#msvc
c:/dev/cpp/sqlite3
"$ENV{LIB_DIR}/lib"
)

IF (SQLITE3_INCLUDE_DIR AND SQLITE3_LIBRARY)
@@ -4,7 +4,9 @@
MACRO(FIND_FLEX)
IF(NOT FLEX_EXECUTABLE)
IF (MSVC)
FIND_PROGRAM(FLEX_EXECUTABLE "C:/dev/cpp/flex/bin/flex.exe")
FIND_PROGRAM(FLEX_EXECUTABLE
"$ENV{LIB_DIR}/bin/flex.exe"
)
ELSE(MSVC)
FIND_PROGRAM(FLEX_EXECUTABLE flex)
ENDIF (MSVC)

0 comments on commit dcd52f1

Please sign in to comment.
You can’t perform that action at this time.