Skip to content

Commit

Permalink
CMake changes:
Browse files Browse the repository at this point in the history
- 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@6467 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Jan 27, 2007
1 parent 9f07002 commit f902722
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 22 deletions.
31 changes: 10 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions tools/mapserver_export/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion tools/mapserver_export/ms_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <QStringList>

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

#include <iostream>

Expand Down

0 comments on commit f902722

Please sign in to comment.