aboutsummaryrefslogtreecommitdiff
path: root/src/bin_projinfo.cmake
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2021-10-23 16:17:36 +0200
committerEven Rouault <even.rouault@spatialys.com>2021-10-23 16:27:30 +0200
commit6e9b324ab7bf5909df7e68409e060282db14fa54 (patch)
tree99383710e05b1e0bb046ce086ad522f54d55d5bc /src/bin_projinfo.cmake
parent9817fe7db31d5a0716876e1f8f7f1a9ba4b91be0 (diff)
downloadPROJ-6e9b324ab7bf5909df7e68409e060282db14fa54.tar.gz
PROJ-6e9b324ab7bf5909df7e68409e060282db14fa54.zip
CMake: revise how we deal with symbol export and static builds
- Remove the explicit PROJ_MSVC_DLL_IMPORT symbol used for importing symbols from a MSVC .dll: by default on MSVC, we use now __declspec(dllimport), unless PROJ_MSVC_DLL_EXPORT is defined by PROJ at build time. This makes it easier for users: they don't have to define anything special. This simplifies in particular the build of our binaries - For static builds, export -DPROJ_DLL= as public, so that users that import PROJ through CMake mechanism don't have to do it manually.
Diffstat (limited to 'src/bin_projinfo.cmake')
-rw-r--r--src/bin_projinfo.cmake4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/bin_projinfo.cmake b/src/bin_projinfo.cmake
index 6d123436..c2449049 100644
--- a/src/bin_projinfo.cmake
+++ b/src/bin_projinfo.cmake
@@ -12,10 +12,6 @@ target_compile_options(binprojinfo PRIVATE ${PROJ_CXX_WARN_FLAGS})
install(TARGETS binprojinfo
DESTINATION ${BINDIR})
-if(MSVC AND BUILD_SHARED_LIBS)
- target_compile_definitions(binprojinfo PRIVATE PROJ_MSVC_DLL_IMPORT=1)
-endif()
-
if(CURL_ENABLED)
target_compile_definitions(binprojinfo PRIVATE -DCURL_ENABLED)
endif()