Hi all,
I am trying to pull in the Arcade-Learning-Environment project via CPM in my project via
CPMAddPackage(
NAME ale
GIT_TAG v0.9.0
# Configuration options passed to the dependency (optional)
SYSTEM TRUE
BUILD_CPP_LIB=ON
BUILD_PYTHON_LIB=OFF
DOWNLOAD_ONLY FALSE
GITHUB_REPOSITORY Farama-Foundation/Arcade-Learning-Environment
)
but run into an error with configure_package_config_file
which is used in the project like so:
root CMakeLists.txt:
...
# Set cmake module path
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
...
project(ale
VERSION ${ALE_DEFAULT_VERSION}
DESCRIPTION "The Arcade Learning Environment (ALE) - a platform for AI research."
HOMEPAGE_URL "http://www.arcadelearningenvironment.org"
LANGUAGES CXX)
# Main ALE src directory
add_subdirectory(src)
...
src/CMakeLists.txt:
...
# Configure installable cmake config
configure_package_config_file(
${CMAKE_MODULE_PATH}/${PROJECT_NAME}-config.cmake.in
${PROJECT_NAME}-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
...
the ale-config.cmake.in file resides in their root-level folder cmake
which seems to be found.
Letting CPM populate this repo now brings up this error though:
CMake Error at /u/michael.aichmueller/cmake-3.26.5-linux-x86_64/share/cmake-3.26/Modules/CMakePackageConfigHelpers.cmake:250 (message):
Unknown keywords given to CONFIGURE_PACKAGE_CONFIG_FILE():
“ale-config.cmake”
Call Stack (most recent call first):
cmake-build-debug-clang-lactose/_deps/ale-src/src/CMakeLists.txt:105 (configure_package_config_file)
I have been trying to fix this in my fork by prepending e.g. ${CMAKE_CURRENT_BINARY_DIR} to the output path of configure_package_config_file
and/or adding quotes, but all lead to errors.
In fact, the documentation and example on the cmake github repo lead me to believe that the usage in ALE is correct.
This was run with cmake 26.5 on an x86-64 ubuntu 22.04 system.
Any tips on why this would not work?