Merge branch 'master' into project_setup_refactor

# Conflicts:
#	3rdParty/CMakeLists.txt
#	3rdParty/libarchive/CMakeLists.txt
#	CMakeLists.txt
This commit is contained in:
Georg Hagen
2024-08-04 18:05:50 +02:00
70 changed files with 1096 additions and 274 deletions

View File

@@ -22,12 +22,12 @@ add_subdirectory(rapidyaml)
add_subdirectory(libarchive)
add_subdirectory(boost)
add_subdirectory(units)
add_subdirectory(libjpeg-turbo)
if (NOT IOS)
add_subdirectory(curl)
endif()
if(ENABLE_TEST)
add_subdirectory(catch2)
endif()
if (NOT IOS)
add_subdirectory(libjpeg-turbo)
add_subdirectory(curl)
endif()

View File

@@ -13,5 +13,8 @@ FetchContent_Declare(
)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
if(APPLE)
set(GLFW_VULKAN_STATIC ON CACHE BOOL "" FORCE)
endif()
FetchContent_MakeAvailable(glfw)
set(glfw_FOUND ON PARENT_SCOPE)
set(glfw_FOUND ON PARENT_SCOPE)

View File

@@ -28,12 +28,21 @@ function(LinkLibArchive TARGET)
find_package(zstd QUIET)
find_package(BZip2 QUIET)
find_package(LibLZMA QUIET)
find_package(LibXml2 QUIET)
find_package(EXPAT QUIET)
target_include_directories(${TARGET} PUBLIC ${LibArchive_INCLUDE_DIR})
target_link_libraries(${TARGET} PUBLIC ${LibArchive_LIBRARIES} ${ZLIB_LIBRARIES} ${zstd_LIBRARIES} ${LZ4_LIBRARIES})
if (BZIP2_LIBRARIES)
target_link_libraries(${TARGET} PUBLIC ${BZIP2_LIBRARIES})
endif()
if (LIBLZMA_LIBRARIES)
target_link_libraries(${TARGET} PUBLIC ${LIBLZMA_LIBRARIES})
endif()
endfunction()
if (LibXml2_FOUND)
target_link_libraries(${TARGET} PUBLIC ${LIBXML2_LIBRARIES})
endif()
if (EXPAT_FOUND)
target_link_libraries(${TARGET} PUBLIC ${EXPAT_LIBRARIES})
endif()
endfunction()

View File

@@ -31,6 +31,11 @@ endif ()
function(LinkLibJpegTurbo TARGET)
if (IOS)
target_link_libraries(${TARGET} PRIVATE "/opt/libjpeg-turbo-ios/lib/libturbojpeg.a")
target_include_directories(${TARGET} PRIVATE "/opt/libjpeg-turbo-ios/include")
return()
endif ()
if (libjpeg-turbo_BUILT)
FindCmakeConfigDirs("${CMAKE_BINARY_DIR}/deps_ljt/INSTALL/" CMAKE_PREFIX_PATH)
endif()