Skip to content

Commit

Permalink
don't _re_create fake grass lib sources on reconfigure unless gisdefs…
Browse files Browse the repository at this point in the history
….h has changed, saves a lot of reconfigure time
  • Loading branch information
kyngchaos committed Apr 2, 2013
1 parent 2f2ca9f commit 00ae45b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/providers/grass/CMakeLists.txt
Expand Up @@ -60,6 +60,11 @@ ENDIF (APPLE)
# Fake GRASS gis library
#

# only process functions if qgsgrassgislibfunctions.cpp/h not present
# or gisdefs.h is newer

IF("${GRASS_INCLUDE_DIR}/grass/gisdefs.h" IS_NEWER_THAN "${CMAKE_CURRENT_BINARY_DIR}/qgsgrassgislibfunctions.cpp" OR "${GRASS_INCLUDE_DIR}/grass/gisdefs.h" IS_NEWER_THAN "${CMAKE_CURRENT_BINARY_DIR}/qgsgrassgislibfunctions.h")

# Generate function mapping for functions used in original version
# Create list of functions to be mapped
SET ( FUNCTIONS
Expand Down Expand Up @@ -497,6 +502,8 @@ LIST ( APPEND PROTOTYPES "}\n" )
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qgsgrassgislibfunctions.cpp" ${FUNCTIONS_MAP})
FILE(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qgsgrassgislibfunctions.h" ${PROTOTYPES})

ENDIF() # process functions

# Build fake library
IF(MSVC)
SET (FAKE_LIB_GRASS_GIS "libgrass_gis.${GRASS_VERSION}")
Expand Down

0 comments on commit 00ae45b

Please sign in to comment.