Skip to content

Commit d5df0ec

Browse files
committed
Add option to enforce use of system libraries on Linux
1 parent 4eab812 commit d5df0ec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ project(qprompt
3636
LANGUAGES CXX)
3737

3838
option(WASM OFF)
39+
option(USE_GIT_DEPENDENCIES_ONLY OFF)
3940
option(SOURCE_DEPENDENCIES_EXCLUSIVELY_FROM_SYSTEM OFF) # Used only on Linux builds for now
4041

4142
# Find includes in corresponding build directories
@@ -146,7 +147,7 @@ if(ANDROID OR IOS OR WASM)
146147
set(BUILD_SHARED_LIBS OFF)
147148
endif()
148149

149-
if(WIN32 OR APPLE OR ANDROID OR WASM)
150+
if(WIN32 OR APPLE OR ANDROID OR WASM OR USE_GIT_DEPENDENCIES_ONLY)
150151
set(BUILD_TESTING OFF)
151152
if(NOT WASM)
152153
FetchContent_Declare(
@@ -173,7 +174,7 @@ else()
173174
)
174175
endif()
175176

176-
if(NOT ANDROID AND NOT IOS AND NOT WASM)
177+
if(NOT ANDROID AND NOT IOS AND NOT WASM AND NOT USE_GIT_DEPENDENCIES_ONLY)
177178
if(NOT BSD AND NOT SOURCE_DEPENDENCIES_EXCLUSIVELY_FROM_SYSTEM)
178179
set(BUILD_SHARED_LIBS ON)
179180
FetchContent_Declare(

0 commit comments

Comments
 (0)