Navigation Menu

Skip to content

Commit

Permalink
Allow specifying native crssync when cross compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro authored and nyalldawson committed Jul 31, 2019
1 parent 1ed3c91 commit 769afbb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/crssync/CMakeLists.txt
Expand Up @@ -22,12 +22,21 @@ IF(MSVC AND NOT USING_NMAKE)
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/crssync.exe
DEPENDS crssync
)
ELSE(MSVC AND NOT USING_NMAKE)
ELSEIF(CMAKE_CROSSCOMPILING)
SET(NATIVE_CRSSYNC_BIN CACHE PATH "Path to a natively compiled synccrsdb binary")
IF(NOT NATIVE_CRSSYNC_BIN)
MESSAGE(FATAL_ERROR "NATIVE_CRSSYNC_BIN needs to be defined when cross-compiling")
ENDIF()
ADD_CUSTOM_TARGET(synccrsdb
COMMAND ${NATIVE_CRSSYNC_BIN}
DEPENDS crssync
)
ELSE()
ADD_CUSTOM_TARGET(synccrsdb
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/crssync
DEPENDS crssync
)
ENDIF(MSVC AND NOT USING_NMAKE)
ENDIF()

INSTALL(CODE "MESSAGE(\"Installing crssync ...\")")
INSTALL(TARGETS crssync RUNTIME DESTINATION ${QGIS_LIBEXEC_DIR})

0 comments on commit 769afbb

Please sign in to comment.