Skip to content

Commit

Permalink
Merged r6535 and r6467 into 0.8
Browse files Browse the repository at this point in the history
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 cf5487b
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit cf5487b

Please sign in to comment.