Fix library name casing.

Change-Id: Iba57c4f57a1cc19fab164a85f2303775fbf1be08
This commit is contained in:
Onha Choe 2017-10-17 23:41:52 -07:00 committed by onhachoe
parent a0eb91056b
commit 7631a5edc0
4 changed files with 16 additions and 5 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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 ()