Skip to content
Permalink
Browse files

CMake changes:

- generate qgsconfig.h and qgssvnversion.h to binary dir, not source dir
- removed QGIS_NO_SVNVERSION


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6467 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Jan 27, 2007
1 parent f509eec commit 28e79f84e6414fbad2aa28491bfe6b1c00d63904
Showing with 12 additions and 22 deletions.
  1. +10 −21 CMakeLists.txt
  2. +1 −0 tools/mapserver_export/CMakeLists.txt
  3. +1 −1 tools/mapserver_export/ms_main.cpp
@@ -167,40 +167,29 @@ ENDIF (WIN32)
#############################################################
# create qgsconfig.h

CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/qgsconfig.h.in ${CMAKE_SOURCE_DIR}/qgsconfig.h)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/qgsconfig.h.in ${CMAKE_BINARY_DIR}/qgsconfig.h)

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR})

#############################################################
# create qgssvnversion.h

# this is useful variable for developers
SET (QGIS_NO_SVNVERSION FALSE CACHE BOOL "Set to true if you don't want qgssvnversion.h to be regenerated every make")

IF (QGIS_NO_SVNVERSION)

ADD_CUSTOM_TARGET(svnversion
echo '\#define QGSSVNVERSION \"\"' > qgssvnversion.h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
IF (WIN32)

# TODO: create qgssvnversion.h properly
ADD_CUSTOM_TARGET(svnversion echo "#define QGSSVNVERSION \"svn\"" > qgssvnversion.h
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})

ELSE (QGIS_NO_SVNVERSION)
ELSE (WIN32)

IF (WIN32)
# TODO: create qgssvnversion.h properly
ADD_CUSTOM_TARGET(svnversion echo "#define QGSSVNVERSION \"svn\"" > qgssvnversion.h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
ELSE (WIN32)
ADD_CUSTOM_TARGET(svnversion ALL
ADD_CUSTOM_TARGET(svnversion ALL
QGSSVNDEF='\#define QGSSVNVERSION \"'`svnversion .`'\"' &&
if [ \"`grep QGSSVNVERSION qgssvnversion.h 2>/dev/null`\" != \"$$QGSSVNDEF\" ]; then
echo $$QGSSVNDEF > qgssvnversion.h \; fi
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})

ENDIF (WIN32)

ENDIF (QGIS_NO_SVNVERSION)

#############################################################
# process subdirs

@@ -23,6 +23,7 @@ QT4_WRAP_CPP (MSEXPORT_MOC_SRCS ${MSEXPORT_MOC_HDRS} ${MSEXPORT_UIS_H})
INCLUDE_DIRECTORIES (
${CMAKE_CURRENT_BINARY_DIR}
${PYTHON_INCLUDE_PATH}
${CMAKE_SOURCE_DIR}/src/core
)

ADD_EXECUTABLE (msexport MACOSX_BUNDLE ${MSEXPORT_SRCS} ${MSEXPORT_MOC_SRCS})
@@ -4,7 +4,7 @@
#include <QStringList>

#include "qgsmapserverexport.h"
#include "src/core/qgsapplication.h"
#include "qgsapplication.h"

#include <iostream>

0 comments on commit 28e79f8

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