mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-06 14:18:15 +01:00
Add zlib as a submodule.
This commit is contained in:
parent
cdc540938a
commit
17ea24cdb0
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -4,3 +4,6 @@
|
||||
[submodule "tools/libraries/excmd"]
|
||||
path = tools/libraries/excmd
|
||||
url = https://github.com/exjam/excmd.git
|
||||
[submodule "tools/libraries/zlib"]
|
||||
path = tools/libraries/zlib
|
||||
url = https://github.com/madler/zlib.git
|
||||
|
@ -14,7 +14,6 @@ else()
|
||||
endif()
|
||||
|
||||
add_subdirectory(libraries)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
include_directories(common)
|
||||
add_subdirectory(elf2rpl)
|
||||
|
@ -6,11 +6,8 @@ file(GLOB_RECURSE HEADER_FILES *.h)
|
||||
add_executable(elf2rpl
|
||||
${SOURCE_FILES} ${HEADER_FILES})
|
||||
|
||||
target_include_directories(elf2rpl PRIVATE
|
||||
${ZLIB_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries(elf2rpl
|
||||
fmt
|
||||
${ZLIB_LIBRARIES})
|
||||
zlib)
|
||||
|
||||
install(TARGETS elf2rpl RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
|
@ -4,3 +4,18 @@ target_include_directories(excmd INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/excmd/sr
|
||||
|
||||
# fmt
|
||||
add_subdirectory(fmt)
|
||||
|
||||
# zlib
|
||||
find_package(ZLIB QUIET)
|
||||
|
||||
if(NOT ZLIB_FOUND)
|
||||
add_subdirectory(zlib)
|
||||
|
||||
target_include_directories(zlib INTERFACE
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/zlib"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/zlib")
|
||||
else()
|
||||
add_library(zlib INTERFACE)
|
||||
target_link_libraries(zlib INTERFACE ${ZLIB_LIBRARIES})
|
||||
target_include_directories(zlib INTERFACE ${ZLIB_INCLUDE_DIR})
|
||||
endif()
|
||||
|
1
tools/libraries/zlib
Submodule
1
tools/libraries/zlib
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f
|
@ -6,12 +6,9 @@ file(GLOB_RECURSE HEADER_FILES *.h)
|
||||
add_executable(readrpl
|
||||
${SOURCE_FILES} ${HEADER_FILES})
|
||||
|
||||
target_include_directories(readrpl PRIVATE
|
||||
${ZLIB_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries(readrpl
|
||||
excmd
|
||||
fmt
|
||||
${ZLIB_LIBRARIES})
|
||||
zlib)
|
||||
|
||||
install(TARGETS readrpl RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
|
@ -6,10 +6,7 @@ file(GLOB_RECURSE HEADER_FILES *.h)
|
||||
add_executable(rplgen
|
||||
${SOURCE_FILES} ${HEADER_FILES})
|
||||
|
||||
target_include_directories(rplgen PRIVATE
|
||||
${ZLIB_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries(rplgen
|
||||
${ZLIB_LIBRARIES})
|
||||
zlib)
|
||||
|
||||
install(TARGETS rplgen RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||
|
Loading…
Reference in New Issue
Block a user