From 6e9b324ab7bf5909df7e68409e060282db14fa54 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sat, 23 Oct 2021 16:17:36 +0200 Subject: 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. --- test/unit/CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) (limited to 'test') diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index cc5d18b7..eb41a6c8 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -51,10 +51,6 @@ endif() # USE_EXTERNAL_GTEST # Build PROJ unit tests # -if(MSVC AND BUILD_SHARED_LIBS) - add_definitions(-DPROJ_MSVC_DLL_IMPORT=1) -endif() - include_directories(${PROJ_SOURCE_DIR}/include) include_directories(${SQLITE3_INCLUDE_DIR}) # Add the directory containing proj_config.h -- cgit v1.2.3