Skip to content
Permalink
Browse files
Merged r6535 and r6467 into 0.8
git-svn-id: http://svn.osgeo.org/qgis/branches/Release-0_8_0@6537 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Feb 6, 2007
1 parent a6fe75d commit cf5487bae03fea8b61d17d5302ca283c1743e929
Showing with 10 additions and 21 deletions.
  1. +10 −21 CMakeLists.txt
@@ -169,40 +169,29 @@ ENDIF (WIN32)
#############################################################
# create qgsconfig.h

CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/qgsconfig.h.in_cmake ${CMAKE_SOURCE_DIR}/qgsconfig.h)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/qgsconfig.h.in_cmake ${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 ALL echo \\"#define QGSSVNVERSION \\\"svn_rev_unavailable\\\" \\" > 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

0 comments on commit cf5487b

Please sign in to comment.