aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorThomas Knudsen <busstoptaktik@users.noreply.github.com>2017-12-18 12:35:06 +0100
committerGitHub <noreply@github.com>2017-12-18 12:35:06 +0100
commite073e13b4d7c830d1e7144c22a1ab1c225f47a39 (patch)
treece97ab2cd8d2da710ec42fa16dbfe6665330b647 /src/CMakeLists.txt
parent95f8e749e712218ca49e4025fe6ab59ddf991c60 (diff)
downloadPROJ-e073e13b4d7c830d1e7144c22a1ab1c225f47a39.tar.gz
PROJ-e073e13b4d7c830d1e7144c22a1ab1c225f47a39.zip
Enable wildcard globbing for MSVC builds (#714)
* Enable wildcard globbing for MSVC builds * Use globbing to run all gie tests * Despite merge title: Also use wildcards on gie tests when using GNU compilers
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 494eef9b..c4f4dd20 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -11,6 +11,7 @@ option(BUILD_NAD2BIN "Build nad2bin (format conversion tool)" ON)
option(BUILD_PROJ "Build proj (cartographic projection tool : latlong <-> projected coordinates)" ON)
if(NOT MSVC)
+
if (NOT APPLE)
# Use relative path so that package is relocatable
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${LIBDIR}")
@@ -22,6 +23,14 @@ if(NOT MSVC)
# (2) setting the INSTALL_RPATH property on the executables to
# "@loader_path/../${LIBDIR}"
endif ()
+
+else ()
+
+ # Linking to setargv.obj enables wildcard globbing for the
+ # command line utilities, when compiling with MSVC
+ # https://docs.microsoft.com/da-dk/cpp/c-language/expanding-wildcard-arguments
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} setargv.obj")
+
endif ()
if(BUILD_CCT)