mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Move where Windows libraries are linked
To where they're actually used. The tests don't need them, and MinGW complains if they aren't linked to the first layer of the C++ wrapper.
This commit is contained in:
+4
-4
@@ -69,6 +69,10 @@ target_link_libraries(libloot_cpp INTERFACE
|
||||
debug "${TARGET_PATH}/debug/${LIBLOOT_CPP_FILENAME}")
|
||||
target_include_directories(libloot_cpp INTERFACE "${TARGET_PATH}/cxxbridge")
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(libloot_cpp INTERFACE ntdll ws2_32 bcrypt)
|
||||
endif()
|
||||
|
||||
|
||||
##############################
|
||||
# General Settings
|
||||
@@ -186,10 +190,6 @@ set_target_properties(libloot PROPERTIES
|
||||
|
||||
if(WIN32)
|
||||
target_compile_definitions(libloot PRIVATE UNICODE _UNICODE LOOT_EXPORT)
|
||||
|
||||
set(LOOT_LIBS ntdll ws2_32 bcrypt)
|
||||
|
||||
target_link_libraries(libloot PRIVATE ${LOOT_LIBS})
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
|
||||
@@ -99,8 +99,6 @@ if(WIN32)
|
||||
if((NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") OR NOT LIBLOOT_BUILD_SHARED)
|
||||
target_compile_definitions(libloot_tests PRIVATE LOOT_STATIC)
|
||||
endif()
|
||||
|
||||
target_link_libraries(libloot_tests PRIVATE ${LOOT_LIBS})
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
|
||||
Reference in New Issue
Block a user