From 097669bc44f59fbbef7893d137bc54fda24dd979 Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Sun, 29 Nov 2020 19:26:21 +0100 Subject: [PATCH] Add dependencies --- 3rdParty/CMakeLists.txt | 5 ++++- 3rdParty/PlatformFolders/CMakeLists.txt | 10 ++++++++++ 3rdParty/opencv/CMakeLists.txt | 10 ++++++++++ 3rdParty/pugixml/CMakeLists.txt | 10 ++++++++++ CMakeLists.txt | 5 ++++- 5 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 3rdParty/PlatformFolders/CMakeLists.txt create mode 100644 3rdParty/opencv/CMakeLists.txt create mode 100644 3rdParty/pugixml/CMakeLists.txt diff --git a/3rdParty/CMakeLists.txt b/3rdParty/CMakeLists.txt index ac66568..6587d22 100644 --- a/3rdParty/CMakeLists.txt +++ b/3rdParty/CMakeLists.txt @@ -6,4 +6,7 @@ endif() add_subdirectory(spdlog) add_subdirectory(assimp) add_subdirectory(magic-enum) -add_subdirectory(yaml-cpp) \ No newline at end of file +add_subdirectory(yaml-cpp) +add_subdirectory(pugixml) +add_subdirectory(opencv) +add_subdirectory(PlatformFolders) \ No newline at end of file diff --git a/3rdParty/PlatformFolders/CMakeLists.txt b/3rdParty/PlatformFolders/CMakeLists.txt new file mode 100644 index 0000000..ef5b5b2 --- /dev/null +++ b/3rdParty/PlatformFolders/CMakeLists.txt @@ -0,0 +1,10 @@ +include(FetchContent) + +FetchContent_Declare( + platform_folders + GIT_REPOSITORY https://github.com/sago007/PlatformFolders.git + GIT_TAG 4.2.0 + GIT_SHALLOW TRUE +) +set(PLATFORMFOLDERS_BUILD_TESTING OFF) +FetchContent_MakeAvailable(platform_folders) \ No newline at end of file diff --git a/3rdParty/opencv/CMakeLists.txt b/3rdParty/opencv/CMakeLists.txt new file mode 100644 index 0000000..93e8ffb --- /dev/null +++ b/3rdParty/opencv/CMakeLists.txt @@ -0,0 +1,10 @@ +Find_Package(OpenCV) +if (NOT OpenCV_FOUND) + FetchContent_Declare( + opencv + GIT_REPOSITORY https://github.com/opencv/opencv.git + GIT_TAG v4.5.0 + GIT_SHALLOW TRUE + ) + FetchContent_MakeAvailable(opencv) +endif() \ No newline at end of file diff --git a/3rdParty/pugixml/CMakeLists.txt b/3rdParty/pugixml/CMakeLists.txt new file mode 100644 index 0000000..3bf6a9a --- /dev/null +++ b/3rdParty/pugixml/CMakeLists.txt @@ -0,0 +1,10 @@ +include(FetchContent) + +FetchContent_Declare( + pugixml + GIT_REPOSITORY https://github.com/zeux/pugixml.git + GIT_TAG v1.11.4 + GIT_SHALLOW TRUE +) +set(PUGIXML_BUILD_TESTS OFF) +FetchContent_MakeAvailable(pugixml) \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 94db735..ac7032f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR) +set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) + if(NOT WIN32) find_package(ECM REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH}) @@ -48,7 +50,8 @@ if (NOT ANDROID AND NOT IOS) target_link_libraries(openVulkanoCpp PRIVATE glfw) endif() -target_link_libraries(openVulkanoCpp PRIVATE magic_enum yaml-cpp spdlog glm assimp) +target_include_directories(openVulkanoCpp PRIVATE ${OpenCV_INCLUDE_DIRS}) +target_link_libraries(openVulkanoCpp PRIVATE magic_enum yaml-cpp spdlog glm assimp pugixml ${OpenCV_LIBS} sago::platform_folders) add_compile_definitions(GLM_FORCE_INTRINSICS)