Skip to content

Commit 2793ca5

Browse files
committed
BUILD: Avoid installing some libraries with missing dependencies
- Do not install library(prolog_pack) if http support is missing. - Do not install SICStus timeout compatibility if multi-threading is not enabled.
1 parent 2ea47fe commit 2793ca5

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

src/CMakeLists.txt

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,11 @@ endif()
182182
if(EMSCRIPTEN)
183183
list(APPEND SWIPL_DATA_library wasm.pl dom.pl)
184184
else()
185-
list(APPEND SWIPL_DATA_library prolog_pack.pl git.pl www_browser.pl)
185+
has_package(http HAVE_HTTP)
186+
list(APPEND SWIPL_DATA_library git.pl www_browser.pl)
187+
if(HAVE_HTTP)
188+
list(APPEND prolog_pack.pl)
189+
endif()
186190
endif()
187191
if(NOT STATIC_EXTENSIONS)
188192
list(APPEND SWIPL_DATA_library shlib.pl)
@@ -240,9 +244,15 @@ endif()
240244
if(NOT EMSCRIPTEN)
241245
list(APPEND SWIPL_DATA_library_unicode unicode_data.pl)
242246
list(APPEND SWIPL_DATA_library_dialect_sicstus
243-
sockets.pl timeout.pl system.pl)
247+
sockets.pl system.pl)
248+
if(MULTI_THREADED)
249+
list(APPEND SWIPL_DATA_library_dialect_sicstus timeout.pl)
250+
endif()
244251
list(APPEND SWIPL_DATA_library_dialect_sicstus4
245-
file_systems.pl sockets.pl timeout.pl system.pl)
252+
file_systems.pl sockets.pl system.pl)
253+
if(MULTI_THREADED)
254+
list(APPEND SWIPL_DATA_library_dialect_sicstus4 timeout.pl)
255+
endif()
246256
list(APPEND SWIPL_DATA_app
247257
pack.pl splfr.pl)
248258
endif()
@@ -666,7 +676,7 @@ if(EPILOG AND APPLE)
666676
if(BUILD_MACOS_BUNDLE)
667677
install(FILES ${ICNS_FILE} DESTINATION ${SWIPL_INSTALL_RESOURCES})
668678
endif()
669-
endif()
679+
endif()
670680

671681
# Create cmake config files
672682
include(CMakePackageConfigHelpers)

0 commit comments

Comments
 (0)