diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a0fa19fe..85be4704 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,12 +99,7 @@ jobs: doxygen \ language-pack-el \ language-pack-tr \ - libbz2-dev \ - libcurl4-gnutls-dev \ - libhttp-parser-dev \ libicu-dev \ - libssh2-1-dev \ - libssl-dev \ g++-8 - name: Run CMake diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2a5251f..a7730b6b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -71,16 +71,11 @@ jobs: - name: Install APT package dependencies run: | sudo apt-get update - sudo apt-get install -y \ + sudo apt-get install -y --no-upgrade \ doxygen \ language-pack-el \ language-pack-tr \ - libbz2-dev \ - libcurl4-gnutls-dev \ - libhttp-parser-dev \ libicu-dev \ - libssh2-1-dev \ - libssl-dev \ g++-8 - name: Run CMake diff --git a/CMakeLists.txt b/CMakeLists.txt index 0ae71b34..66120e66 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -409,9 +409,17 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") UNICODE _UNICODE LOOT_STATIC) target_compile_definitions(loot PRIVATE UNICODE _UNICODE LOOT_EXPORT) target_compile_definitions(libloot_tests PRIVATE UNICODE _UNICODE) + + set(LOOT_LIBS ws2_32 bcrypt) + + target_link_libraries(libloot_internals_tests PRIVATE ${LOOT_LIBS}) + target_link_libraries(loot PRIVATE ${LOOT_LIBS}) else() - target_link_libraries(libloot_internals_tests PRIVATE ICU::uc) - target_link_libraries(loot PRIVATE ICU::uc) + set(LOOT_LIBS ICU::uc pthread stdc++fs) + + target_link_libraries(libloot_internals_tests PRIVATE ${LOOT_LIBS}) + target_link_libraries(loot PRIVATE ${LOOT_LIBS}) + target_link_libraries(libloot_tests PRIVATE pthread) endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") @@ -423,26 +431,6 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") target_compile_options(libloot_internals_tests PRIVATE "-Wall" "-Wextra") target_compile_options(loot PRIVATE "-Wall" "-Wextra") target_compile_options(libloot_tests PRIVATE "-Wall" "-Wextra") - - set(LOOT_LIBS ssl - curl - z - crypto - rt - pthread - icuuc - icui18n - ssh2 - http_parser - stdc++fs) - - if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - list(APPEND LOOT_LIBS supc++) - endif() - - target_link_libraries(libloot_internals_tests PRIVATE ${LOOT_LIBS}) - target_link_libraries(loot PRIVATE ${LOOT_LIBS}) - target_link_libraries(libloot_tests PRIVATE pthread) endif() if(MSVC) @@ -455,18 +443,6 @@ if(MSVC) "/permissive-" "/W4" "$<$,$>:/bigobj>") - - set(LOOT_LIBS - version - ws2_32 - shlwapi - winhttp - crypt32 - Rpcrt4 - bcrypt) - - target_link_libraries(libloot_internals_tests PRIVATE ${LOOT_LIBS}) - target_link_libraries(loot PRIVATE ${LOOT_LIBS}) endif() ##############################