Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fbabb6
commit df41a58
Showing
3 changed files
with
32 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,34 @@ | ||
add_executable(crssync main.cpp) | ||
target_compile_features(crssync PRIVATE cxx_std_17) | ||
|
||
target_link_libraries(crssync | ||
qgis_core | ||
${PROJ_LIBRARY} | ||
${GDAL_LIBRARY} | ||
) | ||
|
||
if(MSVC AND NOT USING_NMAKE) | ||
add_custom_target(synccrsdb | ||
COMMENT "Running crssync" | ||
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/crssync.exe | ||
DEPENDS crssync | ||
) | ||
elseif(CMAKE_CROSSCOMPILING AND NOT MXE) | ||
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() | ||
if (NATIVE_CRSSYNC_BIN) | ||
add_custom_target(synccrsdb | ||
COMMENT "Running native crssync" | ||
COMMAND ${NATIVE_CRSSYNC_BIN} | ||
DEPENDS crssync | ||
) | ||
else() | ||
add_custom_target(synccrsdb | ||
COMMENT "Running crssync" | ||
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/crssync | ||
DEPENDS crssync | ||
|
||
else () | ||
add_executable(crssync main.cpp) | ||
target_compile_features(crssync PRIVATE cxx_std_17) | ||
|
||
target_link_libraries(crssync | ||
qgis_core | ||
${PROJ_LIBRARY} | ||
${GDAL_LIBRARY} | ||
) | ||
endif() | ||
|
||
install(CODE "message(\"Installing crssync ...\")") | ||
install(TARGETS crssync RUNTIME DESTINATION ${QGIS_LIBEXEC_DIR}) | ||
if(MSVC AND NOT USING_NMAKE) | ||
add_custom_target(synccrsdb | ||
COMMENT "Running crssync" | ||
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/crssync.exe | ||
DEPENDS crssync | ||
) | ||
else() | ||
add_custom_target(synccrsdb | ||
COMMENT "Running crssync" | ||
COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/crssync | ||
DEPENDS crssync | ||
) | ||
endif() | ||
|
||
install(CODE "message(\"Installing crssync ...\")") | ||
install(TARGETS crssync RUNTIME DESTINATION ${QGIS_LIBEXEC_DIR}) | ||
|
||
endif() |