mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-06 15:48:13 +01:00
When building intree zlib, build zlibstatic not shared.
This commit is contained in:
parent
b48055dcb5
commit
2420cf70d5
@ -9,6 +9,6 @@ add_executable(elf2rpl
|
||||
target_link_libraries(elf2rpl
|
||||
excmd
|
||||
fmt
|
||||
zlib)
|
||||
zlibstatic)
|
||||
|
||||
install(TARGETS elf2rpl RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
|
@ -11,16 +11,15 @@ find_package(ZLIB QUIET)
|
||||
if(NOT ZLIB_FOUND)
|
||||
# Disable zlib install
|
||||
set(SKIP_INSTALL_ALL 1)
|
||||
set(BUILD_SHARED_LIBS OFF)
|
||||
add_subdirectory(zlib)
|
||||
|
||||
target_include_directories(zlib INTERFACE
|
||||
target_include_directories(zlibstatic INTERFACE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/zlib"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/zlib")
|
||||
|
||||
install(FILES "${CMAKE_BINARY_DIR}/bin/zlib.dll"
|
||||
DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
else()
|
||||
add_library(zlib INTERFACE)
|
||||
target_link_libraries(zlib INTERFACE ${ZLIB_LIBRARIES})
|
||||
target_include_directories(zlib INTERFACE ${ZLIB_INCLUDE_DIR})
|
||||
# Not actually static, but who cares...
|
||||
add_library(zlibstatic INTERFACE)
|
||||
target_link_libraries(zlibstatic INTERFACE ${ZLIB_LIBRARIES})
|
||||
target_include_directories(zlibstatic INTERFACE ${ZLIB_INCLUDE_DIR})
|
||||
endif()
|
||||
|
@ -13,6 +13,6 @@ add_executable(readrpl
|
||||
target_link_libraries(readrpl
|
||||
excmd
|
||||
fmt
|
||||
zlib)
|
||||
zlibstatic)
|
||||
|
||||
install(TARGETS readrpl RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
|
@ -4,6 +4,6 @@ add_executable(rplexportgen
|
||||
rplexportgen.cpp)
|
||||
|
||||
target_link_libraries(rplexportgen
|
||||
zlib)
|
||||
zlibstatic)
|
||||
|
||||
install(TARGETS rplexportgen RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
|
@ -4,6 +4,6 @@ add_executable(rplimportgen
|
||||
rplimportgen.cpp)
|
||||
|
||||
target_link_libraries(rplimportgen
|
||||
zlib)
|
||||
zlibstatic)
|
||||
|
||||
install(TARGETS rplimportgen RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
|
@ -1,11 +1,7 @@
|
||||
project(udplogserver)
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES *.cpp)
|
||||
file(GLOB_RECURSE HEADER_FILES *.h)
|
||||
|
||||
add_executable(udplogserver
|
||||
${SOURCE_FILES}
|
||||
${HEADER_FILES})
|
||||
main.cpp)
|
||||
|
||||
if(MSVC)
|
||||
target_link_libraries(udplogserver PRIVATE ws2_32)
|
||||
|
Loading…
Reference in New Issue
Block a user