Skip to content
Permalink
Browse files

run crssync on install (fixes #17993)

  • Loading branch information
jef-n committed Jan 31, 2018
1 parent 3e42f80 commit 4afe9678ddd633225db851c31a14d5e63b160611
Showing with 10 additions and 1 deletion.
  1. +6 −0 postinstall/CMakeLists.txt
  2. +4 −1 postinstall/PostInstall.cmake.in
@@ -2,5 +2,11 @@
# for included scripts that set policies
INSTALL (CODE "cmake_policy(SET CMP0011 NEW)")

IF(MSVC AND NOT USING_NMAKE)
SET(CRSSYNC "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/crssync.exe")
ELSE(MSVC AND NOT USING_NMAKE)
SET(CRSSYNC "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/crssync")
ENDIF(MSVC AND NOT USING_NMAKE)

CONFIGURE_FILE("PostInstall.cmake.in" "PostInstall.cmake" @ONLY)
INSTALL(SCRIPT "${CMAKE_BINARY_DIR}/postinstall/PostInstall.cmake")
@@ -5,5 +5,8 @@ CMAKE_POLICY(SET CMP0012 NEW)
IF(@WITH_PY_COMPILE@)
MESSAGE(STATUS "Byte-compiling core Python utilities and plugins...")
# exclude Python 3 modules in PyQt4.uic package
EXECUTE_PROCESS(COMMAND @PYTHON_EXECUTABLE@ -m compileall -q -x ".*uic.port_v3.*" "@CMAKE_INSTALL_PREFIX@/@QGIS_DATA_DIR@/python")
EXECUTE_PROCESS(COMMAND @PYTHON_EXECUTABLE@ -m compileall -q -x ".*uic.port_v3.*" "$ENV{DESTDIR}@CMAKE_INSTALL_PREFIX@/@QGIS_DATA_DIR@/python")
ENDIF(@WITH_PY_COMPILE@)

set(ENV{QGIS_PREFIX_PATH} "$ENV{DESTDIR}@CMAKE_INSTALL_PREFIX@")
EXECUTE_PROCESS(COMMAND "@CRSSYNC@")

0 comments on commit 4afe967

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