diff --git a/Libraries/graphics/CMakeLists.txt b/Libraries/graphics/CMakeLists.txt index 1dd80629..5435303f 100644 --- a/Libraries/graphics/CMakeLists.txt +++ b/Libraries/graphics/CMakeLists.txt @@ -20,8 +20,11 @@ target_link_libraries(graphics PUBLIC ext "${ZLIB_LIBRARIES}") target_include_directories(graphics PRIVATE "${ZLIB_INCLUDE_DIR}") if ("${CMAKE_SYSTEM_NAME}" MATCHES "Windows") - target_link_libraries(graphics PRIVATE gdiplus ole32) - target_link_libraries(graphics PRIVATE wsock32 ws2_32) + if ("${CMAKE_CXX_PLATFORM_ID}" STREQUAL "MinGW") + target_link_libraries(graphics PRIVATE gdiplus ole32 wsock32 ws2_32) + else () + target_link_libraries(graphics PRIVATE gdiplus Ole32 WSock32 WS2_32) + endif () elseif ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin") find_library(CORE_FOUNDATION CoreFoundation) find_library(CORE_GRAPHICS CoreGraphics) diff --git a/Libraries/libbom/CMakeLists.txt b/Libraries/libbom/CMakeLists.txt index 934beea8..64c103d2 100644 --- a/Libraries/libbom/CMakeLists.txt +++ b/Libraries/libbom/CMakeLists.txt @@ -15,7 +15,11 @@ add_library(bom target_link_libraries(bom PUBLIC util) if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") - target_link_libraries(bom PRIVATE wsock32 ws2_32) + if ("${CMAKE_CXX_PLATFORM_ID}" STREQUAL "MinGW") + target_link_libraries(bom PRIVATE wsock32 ws2_32) + else () + target_link_libraries(bom PRIVATE WSock32 WS2_32) + endif () endif () target_include_directories(bom PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/Headers") install(TARGETS bom DESTINATION usr/lib) diff --git a/Libraries/plist/CMakeLists.txt b/Libraries/plist/CMakeLists.txt index a76dfd6c..a3197d63 100644 --- a/Libraries/plist/CMakeLists.txt +++ b/Libraries/plist/CMakeLists.txt @@ -63,7 +63,7 @@ if ("${CMAKE_SYSTEM_NAME}" MATCHES "Windows") # MinGW is missing the library for XmlLite. target_link_libraries(plist PRIVATE ole32) else () - target_link_libraries(plist PRIVATE XmlLite ole32) + target_link_libraries(plist PRIVATE xmllite Ole32) endif () else () find_package(LibXml2 REQUIRED) diff --git a/Libraries/process/CMakeLists.txt b/Libraries/process/CMakeLists.txt index 0d0c4c9e..965c08c5 100644 --- a/Libraries/process/CMakeLists.txt +++ b/Libraries/process/CMakeLists.txt @@ -27,5 +27,9 @@ find_package(Threads REQUIRED) target_link_libraries(process PRIVATE ${CMAKE_THREAD_LIBS_INIT}) if ("${CMAKE_SYSTEM_NAME}" MATCHES "Windows") - target_link_libraries(process PRIVATE userenv shell32 advapi32) + if ("${CMAKE_CXX_PLATFORM_ID}" STREQUAL "MinGW") + target_link_libraries(process PRIVATE userenv shell32 advapi32) + else () + target_link_libraries(process PRIVATE UserEnv shell32 AdvAPI32) + endif () endif ()