Open
Description
- I've read Brief overview section and do understand basic concepts. [Yes]
- I've read F.A.Q. section and haven't found an answer to my question. [Yes]
- I've read Code of Conduct, I promise to be polite and will do my best at being constructive. [Yes]
I tried to use a LOCAL
config file for additional cmake arguments for the libigl
package.
And it seems that hunter will try to find the config.cmake
in a different location.
Instead of ${CMAKE_CURRENT_LIST_DIR}/cmake/Hunter/config.cmake
, it will look for
${CMAKE_CURRENT_LIST_DIR}/_build/_deps/setuphunter-src/cmake/Hunter/config.cmake
cmake_minimum_required(VERSION 3.15)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
### Hunter snapshot that will be used ###
set(HUNTER_URL "https://github.com/cpp-pm/hunter/archive/v0.23.288.tar.gz")
set(HUNTER_SHA1 "6c9b2bc606d86ae31f96a62fc68f0a593024815b")
set(HUNTER_LOCAL_CONFIG ON)
# add packages
set(HUNTER_PACKAGES libigl Eigen spdlog nlohmann_json)
include(FetchContent)
FetchContent_Declare(SetupHunter GIT_REPOSITORY https://github.com/cpp-pm/gate)
FetchContent_MakeAvailable(SetupHunter)
project(sculptingUI)
message(STATUS "cmake begin for DigitalSculptingUI.")
add_subdirectory(src)
message(STATUS "cmake done for DigitalSculptingUI.")
message(STATUS "============================.")
The output:
[hunter ** FATAL ERROR **] Config not found: C:/Users/xarthur/source/sculpting_project/OPT_UI/_build/_deps/setuphunter-src/cmake/Hunter/config.cmake
[hunter ** FATAL ERROR **] [Directory:C:/Users/xarthur/source/sculpting_project/OPT_UI/_build/_deps/setuphunter-src]
------------------------------ ERROR -----------------------------
https://hunter.readthedocs.io/en/latest/reference/errors/error.incorrect.input.data.html
------------------------------------------------------------------
CMake Error at C:/Libraries/hunter_pkg/_Base/Download/Hunter/0.23.288/6c9b2bc/Unpacked/cmake/modules/hunter_error_page.cmake:12 (message):
Call Stack (most recent call first):
C:/Libraries/hunter_pkg/_Base/Download/Hunter/0.23.288/6c9b2bc/Unpacked/cmake/modules/hunter_fatal_error.cmake:20 (hunter_error_page)
C:/Libraries/hunter_pkg/_Base/Download/Hunter/0.23.288/6c9b2bc/Unpacked/cmake/modules/hunter_user_error.cmake:7 (hunter_fatal_error)
C:/Libraries/hunter_pkg/_Base/Download/Hunter/0.23.288/6c9b2bc/Unpacked/cmake/modules/hunter_set_config_location.cmake:50 (hunter_user_error)
C:/Libraries/hunter_pkg/_Base/Download/Hunter/0.23.288/6c9b2bc/Unpacked/cmake/modules/hunter_apply_gate_settings.cmake:85 (hunter_set_config_location)
C:/Libraries/hunter_pkg/_Base/Download/Hunter/0.23.288/6c9b2bc/Unpacked/cmake/modules/hunter_finalize.cmake:73 (hunter_apply_gate_settings)
C:/Libraries/hunter_pkg/_Base/Download/Hunter/0.23.288/6c9b2bc/Unpacked/cmake/modules/hunter_add_package.cmake:23 (hunter_finalize)
_build/_deps/setuphunter-src/CMakeLists.txt:142 (hunter_add_package)