Squash project setup refactor
This commit is contained in:
committed by
Georg Hagen
parent
6a1a76f4d1
commit
071ced8cb0
5
3rdParty/CMakeLists.txt
vendored
5
3rdParty/CMakeLists.txt
vendored
@@ -22,6 +22,11 @@ add_subdirectory(rapidyaml)
|
||||
add_subdirectory(libarchive)
|
||||
add_subdirectory(boost)
|
||||
add_subdirectory(units)
|
||||
|
||||
if(ENABLE_TEST)
|
||||
add_subdirectory(catch2)
|
||||
endif()
|
||||
|
||||
if (NOT IOS)
|
||||
add_subdirectory(libjpeg-turbo)
|
||||
add_subdirectory(curl)
|
||||
|
||||
14
3rdParty/catch2/CMakeLists.txt
vendored
Normal file
14
3rdParty/catch2/CMakeLists.txt
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
include (FetchContent)
|
||||
|
||||
if(NOT DEFINED CATCH_REPO)
|
||||
set(CATCH_REPO https://github.com/catchorg/Catch2.git)
|
||||
endif ()
|
||||
|
||||
FetchContent_Declare(
|
||||
Catch2
|
||||
GIT_REPOSITORY ${CATCH_REPO}
|
||||
GIT_TAG v3.6.0
|
||||
GIT_SHALLOW TRUE
|
||||
)
|
||||
|
||||
FetchContent_MakeAvailable(Catch2)
|
||||
16
3rdParty/curl/CMakeLists.txt
vendored
16
3rdParty/curl/CMakeLists.txt
vendored
@@ -1,4 +1,4 @@
|
||||
include(../../cmake/Utils.cmake)
|
||||
include(Utils)
|
||||
|
||||
set(CURL_DEPS_INSTALL ${CMAKE_BINARY_DIR}/deps_curl)
|
||||
find_package(CURL QUIET)
|
||||
@@ -31,18 +31,18 @@ function(LinkCurl TARGET)
|
||||
find_package(CURL QUIET)
|
||||
if (NOT ${CURL_FOUND})
|
||||
set(CURL_DEPS_INSTALL ${CMAKE_BINARY_DIR}/deps_curl)
|
||||
target_include_directories(${TARGET} PRIVATE ${CURL_DEPS_INSTALL}/INSTALL/include)
|
||||
target_link_directories(${TARGET} PRIVATE ${CURL_DEPS_INSTALL}/INSTALL/lib)
|
||||
target_include_directories(${TARGET} PUBLIC ${CURL_DEPS_INSTALL}/INSTALL/include)
|
||||
target_link_directories(${TARGET} PUBLIC ${CURL_DEPS_INSTALL}/INSTALL/lib)
|
||||
|
||||
if (APPLE)
|
||||
target_link_libraries(${TARGET} PRIVATE curl)
|
||||
target_link_libraries(${TARGET} PUBLIC curl)
|
||||
elseif (WIN32)
|
||||
target_link_libraries(${TARGET} PRIVATE ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||
target_link_libraries(${TARGET} PUBLIC ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||
else ()
|
||||
target_link_libraries(${TARGET} PRIVATE crypto ssl curl)
|
||||
target_link_libraries(${TARGET} PUBLIC crypto ssl curl)
|
||||
endif ()
|
||||
else ()
|
||||
target_include_directories(${TARGET} PRIVATE ${CURL_INCLUDE_DIR})
|
||||
target_link_libraries(${TARGET} PRIVATE CURL::libcurl)
|
||||
target_include_directories(${TARGET} PUBLIC ${CURL_INCLUDE_DIR})
|
||||
target_link_libraries(${TARGET} PUBLIC CURL::libcurl)
|
||||
endif ()
|
||||
endfunction()
|
||||
1
3rdParty/imgui/CMakeLists.txt
vendored
1
3rdParty/imgui/CMakeLists.txt
vendored
@@ -1,4 +1,5 @@
|
||||
include(FetchContent)
|
||||
include(SetupVulkan)
|
||||
|
||||
if(NOT DEFINED IMGUI_REPO)
|
||||
set(IMGUI_REPO https://github.com/ocornut/imgui.git)
|
||||
|
||||
10
3rdParty/libarchive/CMakeLists.txt
vendored
10
3rdParty/libarchive/CMakeLists.txt
vendored
@@ -1,4 +1,4 @@
|
||||
include(../../cmake/Utils.cmake)
|
||||
include(Utils)
|
||||
|
||||
find_package(LibArchive QUIET)
|
||||
if (NOT DEFINED LibArchive_LIBRARIES)
|
||||
@@ -28,12 +28,12 @@ function(LinkLibArchive TARGET)
|
||||
find_package(zstd QUIET)
|
||||
find_package(BZip2 QUIET)
|
||||
find_package(LibLZMA QUIET)
|
||||
target_include_directories(${TARGET} PRIVATE ${LibArchive_INCLUDE_DIR})
|
||||
target_link_libraries(${TARGET} PRIVATE ${LibArchive_LIBRARIES} ${ZLIB_LIBRARIES} ${zstd_LIBRARIES} ${LZ4_LIBRARIES})
|
||||
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} PRIVATE ${BZIP2_LIBRARIES})
|
||||
target_link_libraries(${TARGET} PUBLIC ${BZIP2_LIBRARIES})
|
||||
endif()
|
||||
if (LIBLZMA_LIBRARIES)
|
||||
target_link_libraries(${TARGET} PRIVATE ${LIBLZMA_LIBRARIES})
|
||||
target_link_libraries(${TARGET} PUBLIC ${LIBLZMA_LIBRARIES})
|
||||
endif()
|
||||
endfunction()
|
||||
2
3rdParty/libjpeg-turbo/CMakeLists.txt
vendored
2
3rdParty/libjpeg-turbo/CMakeLists.txt
vendored
@@ -1,4 +1,4 @@
|
||||
include(../../cmake/Utils.cmake)
|
||||
include(Utils)
|
||||
|
||||
if (NOT IOS)
|
||||
Find_Package(libjpeg-turbo QUIET)
|
||||
|
||||
Reference in New Issue
Block a user