diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2022-02-09 12:43:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-09 12:43:38 +0100 |
| commit | 021d6bbabf7eed684db0dbee3a53e9a34c2b19dc (patch) | |
| tree | 1ac5f738c0ba76169b5a4d4e6d2be21bd9b16b3b | |
| parent | ca1ec7b147087f18bec0b3cf0b0548f3f034c675 (diff) | |
| parent | 0fd9cfb56eee25aa6ca4aa6148cd7af1ae996175 (diff) | |
| download | PROJ-021d6bbabf7eed684db0dbee3a53e9a34c2b19dc.tar.gz PROJ-021d6bbabf7eed684db0dbee3a53e9a34c2b19dc.zip | |
Merge pull request #3042 from rouault/build_shared_libs_default_win32
CMake: make BUILD_SHARED_LIBS=ON the default even on Windows
| -rw-r--r-- | docs/source/install.rst | 5 | ||||
| -rw-r--r-- | 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 <https://cmake.org/cmake/help/v3.9/variable/BUILD_SHARED_LIBS.html>`_. .. 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) |
