mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-07 23:10:42 +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"]
|
[submodule "tools/libraries/excmd"]
|
||||||
path = tools/libraries/excmd
|
path = tools/libraries/excmd
|
||||||
url = https://github.com/exjam/excmd.git
|
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()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(libraries)
|
add_subdirectory(libraries)
|
||||||
find_package(ZLIB REQUIRED)
|
|
||||||
|
|
||||||
include_directories(common)
|
include_directories(common)
|
||||||
add_subdirectory(elf2rpl)
|
add_subdirectory(elf2rpl)
|
||||||
|
@ -6,11 +6,8 @@ file(GLOB_RECURSE HEADER_FILES *.h)
|
|||||||
add_executable(elf2rpl
|
add_executable(elf2rpl
|
||||||
${SOURCE_FILES} ${HEADER_FILES})
|
${SOURCE_FILES} ${HEADER_FILES})
|
||||||
|
|
||||||
target_include_directories(elf2rpl PRIVATE
|
|
||||||
${ZLIB_INCLUDE_DIR})
|
|
||||||
|
|
||||||
target_link_libraries(elf2rpl
|
target_link_libraries(elf2rpl
|
||||||
fmt
|
fmt
|
||||||
${ZLIB_LIBRARIES})
|
zlib)
|
||||||
|
|
||||||
install(TARGETS elf2rpl RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
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
|
# fmt
|
||||||
add_subdirectory(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
|
add_executable(readrpl
|
||||||
${SOURCE_FILES} ${HEADER_FILES})
|
${SOURCE_FILES} ${HEADER_FILES})
|
||||||
|
|
||||||
target_include_directories(readrpl PRIVATE
|
|
||||||
${ZLIB_INCLUDE_DIR})
|
|
||||||
|
|
||||||
target_link_libraries(readrpl
|
target_link_libraries(readrpl
|
||||||
excmd
|
excmd
|
||||||
fmt
|
fmt
|
||||||
${ZLIB_LIBRARIES})
|
zlib)
|
||||||
|
|
||||||
install(TARGETS readrpl RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
install(TARGETS readrpl RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||||
|
@ -6,10 +6,7 @@ file(GLOB_RECURSE HEADER_FILES *.h)
|
|||||||
add_executable(rplgen
|
add_executable(rplgen
|
||||||
${SOURCE_FILES} ${HEADER_FILES})
|
${SOURCE_FILES} ${HEADER_FILES})
|
||||||
|
|
||||||
target_include_directories(rplgen PRIVATE
|
|
||||||
${ZLIB_INCLUDE_DIR})
|
|
||||||
|
|
||||||
target_link_libraries(rplgen
|
target_link_libraries(rplgen
|
||||||
${ZLIB_LIBRARIES})
|
zlib)
|
||||||
|
|
||||||
install(TARGETS rplgen RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
install(TARGETS rplgen RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin")
|
||||||
|
Loading…
Reference in New Issue
Block a user