Hey guys! I’m getting the following error with my setup:
CMake Error at vendor/engine/CMakeLists.txt:45 (include):
include could not find load file:
UrhoCommon
CMake Error: Error processing file: /home/foo/MyProject/CMake/Modules/GetUrhoRevision.cmake
CMake Error at vendor/engine/CMakeLists.txt:86 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.
CMake Error at /usr/share/cmake-3.17/Modules/CPack.cmake:561 (message):
CPack license resource file: "/home/foo/MyProject/LICENSE" could not be found.
Call Stack (most recent call first):
/usr/share/cmake-3.17/Modules/CPack.cmake:566 (cpack_check_file_exists)
vendor/engine/CMakeLists.txt:167 (include)
CMake Error at vendor/engine/Source/ThirdParty/ETCPACK/CMakeLists.txt:30 (setup_library):
Unknown CMake command "setup_library".
Here’s how my CMake looks like:
cmake_minimum_required(VERSION 3.8)
project(MyProject VERSION 0.1.0)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_STANDARD 17)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin")
set(SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/src)
set(VENDOR_DIR ${CMAKE_CURRENT_LIST_DIR}/vendor)
set(PROJECT_INCLUDE_DIRS)
set(PROJECT_LINK_DIRS)
set(PROJECT_SOURCES ${SOURCE_DIR}/main.cpp)
list(APPEND CMAKE_MODULE_PATH "${VENDOR_DIR}/engine/CMake/Modules")
add_subdirectory(${VENDOR_DIR}/engine)
add_executable(${PROJECT_NAME} ${PROJECT_SOURCES})
target_link_libraries(${PROJECT_NAME} Urho3D)
I’ve added Urho as a git submodule, following the ideas of this repo: https://github.com/Polytonic/Glitter