diff --git a/CMakeLists.txt b/CMakeLists.txt index 168d62f..4bfc22c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,18 +23,8 @@ qt_standard_project_setup() include(GNUInstallDirs) include(CMakePackageConfigHelpers) -configure_file(CMakeLists.txt.zlib zlib/CMakeLists.txt) -execute_process(COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} . - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/zlib) -execute_process(COMMAND ${CMAKE_COMMAND} --build . - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/zlib ) - -set(ZLIB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/zlib/install) -find_package(ZLIB REQUIRED) -include_directories( ${CMAKE_CURRENT_BINARY_DIR}/zlib/install/include) - -include(CMakeLists.txt.quazip) -include_directories(${CMAKE_CURRENT_BINARY_DIR}/_deps/quazip-src) +include(ZlibConfig.cmake) +include(QuaZipConfig.cmake) set(${PROJECT_NAME}_SOURCES src/EibleUtilities.h diff --git a/CMakeLists.txt.quazip b/QuaZipConfig.cmake similarity index 75% rename from CMakeLists.txt.quazip rename to QuaZipConfig.cmake index 796ccf5..1acf6e6 100644 --- a/CMakeLists.txt.quazip +++ b/QuaZipConfig.cmake @@ -7,3 +7,5 @@ FetchContent_Declare( ) FetchContent_MakeAvailable(QuaZip) + +include_directories(${CMAKE_CURRENT_BINARY_DIR}/_deps/quazip-src) diff --git a/ZlibConfig.cmake b/ZlibConfig.cmake new file mode 100644 index 0000000..ac8b005 --- /dev/null +++ b/ZlibConfig.cmake @@ -0,0 +1,9 @@ +configure_file(CMakeLists.txt.zlib zlib/CMakeLists.txt) +execute_process(COMMAND ${CMAKE_COMMAND} -G ${CMAKE_GENERATOR} . + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/zlib) +execute_process(COMMAND ${CMAKE_COMMAND} --build . + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/zlib ) + +set(ZLIB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/zlib/install) +find_package(ZLIB REQUIRED) +include_directories( ${CMAKE_CURRENT_BINARY_DIR}/zlib/install/include) \ No newline at end of file