From 0fd9cfb56eee25aa6ca4aa6148cd7af1ae996175 Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 7 Feb 2022 23:43:51 +0100 Subject: CMake: make BUILD_SHARED_LIBS=ON the default even on Windows --- docs/source/install.rst | 5 +++-- src/lib_proj.cmake | 8 ++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/docs/source/install.rst b/docs/source/install.rst index 107fe437..17d31488 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -258,14 +258,15 @@ All cached entries can be viewed using ``cmake -LAH`` from a build directory. .. option:: BUILD_SHARED_LIBS - Build PROJ library shared. Default for Windows is OFF, building only - a static library. Default for all others is ON. See also the CMake + Build PROJ library shared. Default is ON. See also the CMake documentation for `BUILD_SHARED_LIBS `_. .. versionchanged:: 7.0 Renamed from ``BUILD_LIBPROJ_SHARED`` + .. note:: before PROJ 9.0, the default was OFF for Windows builds. + .. option:: BUILD_TESTING=ON CTest option to build the testing tree, which also downloads and installs diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake index a35eeb8c..b44c9fbd 100644 --- a/src/lib_proj.cmake +++ b/src/lib_proj.cmake @@ -4,13 +4,9 @@ message(STATUS "Configuring proj library:") ### SWITCH BETWEEN STATIC OR SHARED LIBRARY### ############################################## -# default config is shared, except static on Windows -set(BUILD_SHARED_LIBS_DEFAULT ON) -if(WIN32) - set(BUILD_SHARED_LIBS_DEFAULT OFF) -endif() +# default config is shared option(BUILD_SHARED_LIBS - "Build PROJ library shared." ${BUILD_SHARED_LIBS_DEFAULT}) + "Build PROJ library shared." ON) option(USE_THREAD "Build libproj with thread/mutex support " ON) if(NOT USE_THREAD) -- cgit v1.2.3