Skip to content

Commit

Permalink
begin packaging msvc build using CPack
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@7351 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 7, 2007
1 parent bc72f77 commit b922fc9
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions CMakeLists.txt
Expand Up @@ -139,13 +139,19 @@ ENDIF (CMAKE_BUILD_TYPE MATCHES Debug)
# platform specific stuff

IF (WIN32)

SET (QGIS_BIN_DIR ${CMAKE_INSTALL_PREFIX})
SET (QGIS_DATA_DIR ${CMAKE_INSTALL_PREFIX})
SET (QGIS_PLUGIN_DIR ${CMAKE_INSTALL_PREFIX}/plugins)
SET (QGIS_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
SET (QGIS_SOURCE_DIR ${CMAKE_SOURCE_DIR})
IF(MSVC)
IF(NOT MSVC)
SET (QGIS_BIN_DIR ${CMAKE_INSTALL_PREFIX})
SET (QGIS_DATA_DIR ${CMAKE_INSTALL_PREFIX})
SET (QGIS_PLUGIN_DIR ${CMAKE_INSTALL_PREFIX}/plugins)
SET (QGIS_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include)
ELSE (NOT MSVC)
# FIXME:
# . just deals with leading / where these macros are used.
SET (QGIS_BIN_DIR .)
SET (QGIS_DATA_DIR .)
SET (QGIS_PLUGIN_DIR plugins)
SET (QGIS_INCLUDE_DIR include)
#tell msvc compiler to use main instead of winmain as the
#application entry point
SET(QT_USE_QTMAIN TRUE)
Expand All @@ -161,8 +167,12 @@ IF (WIN32)
ADD_DEFINITIONS(-DX_OK=1)
ADD_DEFINITIONS(-DW_OK=2)
ADD_DEFINITIONS(-DR_OK=4)
ENDIF(MSVC)

# ADD_DEFINITIONS(-DQGISDEBUG)

FILE(GLOB files "${CMAKE_SOURCE_DIR}/win_build/vcdeps/*.*")
INSTALL(FILES ${files} DESTINATION .)
ENDIF(NOT MSVC)
ELSE (WIN32)

IF (APPLE)
Expand Down Expand Up @@ -283,7 +293,7 @@ SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/COPYING")
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
SET(CPACK_PACKAGE_VERSION_MINOR "9")
SET(CPACK_PACKAGE_VERSION_PATCH "1")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMAKE_VERSION_MAJOR}.${CMAKE_VERSION_MINOR}")
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Quantum GIS ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
IF(WIN32 AND NOT UNIX)
# There is a bug in NSI that does not handle full unix paths properly. Make
# sure there is at least one set of four (4) backlasshes.
Expand All @@ -294,6 +304,8 @@ IF(WIN32 AND NOT UNIX)
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\qgis.org")
SET(CPACK_NSIS_CONTACT "tim@linfiniti.com")
SET(CPACK_NSIS_MODIFY_PATH ON)

# SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS " !include \\\"${CMAKE_SOURCE_DIR}\\\\win_build\\\\extra.nsh\\\"")
ELSE(WIN32 AND NOT UNIX)
#SET(CPACK_STRIP_FILES "Quantum GIS")
#SET(CPACK_SOURCE_STRIP_FILES "")
Expand Down

0 comments on commit b922fc9

Please sign in to comment.