I got a project with several libraries and programs, each using cmake scripts to build them. What I would like to do is define a cmake package, where I define common compiler flags and define a new build type with specific compiler flags (“Coverage” build type with coverage gcc flags).
The “CMakeList.txt” is:
cmake_minimum_required( VERSION 3.22 )
include(CMakePackageConfigHelpers)
find_package( boost_coroutine )
# For testing to see if it works
#find_package( VhipBuild )
install(FILES VhipBuild.cmake DESTINATION lib/cmake/vhip)
configure_package_config_file(
"VhipBuildConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/VhipBuildConfig.cmake"
INSTALL_DESTINATION "lib/cmake/vhip/"
<code>
project( VhipBuild )
cmake_minimum_required( VERSION 3.22 )
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
find_package( boost_coroutine )
# For testing to see if it works
#find_package( VhipBuild )
install(FILES VhipBuild.cmake DESTINATION lib/cmake/vhip)
configure_package_config_file(
"VhipBuildConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/VhipBuildConfig.cmake"
INSTALL_DESTINATION "lib/cmake/vhip/"
)
</code>
project( VhipBuild )
cmake_minimum_required( VERSION 3.22 )
include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
find_package( boost_coroutine )
# For testing to see if it works
#find_package( VhipBuild )
install(FILES VhipBuild.cmake DESTINATION lib/cmake/vhip)
configure_package_config_file(
"VhipBuildConfig.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/VhipBuildConfig.cmake"
INSTALL_DESTINATION "lib/cmake/vhip/"
)
The “VhipBuildConfig.cmake.in” is like this:
include("${CMAKE_CURRENT_LIST_DIR}/VhipBuild.cmake")
check_required_components( VhipBuildConfig )
<code>@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/VhipBuild.cmake")
check_required_components( VhipBuildConfig )
</code>
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/VhipBuild.cmake")
check_required_components( VhipBuildConfig )
The “VhipBuild.cmake” is like this:
<code># define compiler flags for the "Coverage" build type
add_compile_options( "$<$<CONFIG:Coverage>:-g>" )
add_compile_options( "$<$<CONFIG:Coverage>:-Og>" )
add_compile_options( "$<$<CONFIG:Coverage>:-fprofile-arcs>" )
add_compile_options( "$<$<CONFIG:Coverage>:-ftest-coverage>" )
# define compiler flags for the "Coverage" build type
add_link_options( "$<$<CONFIG:Coverage>:--coverage>" )
<code># define compiler flags for the "Coverage" build type
add_compile_options( "$<$<CONFIG:Coverage>:-g>" )
add_compile_options( "$<$<CONFIG:Coverage>:-Og>" )
add_compile_options( "$<$<CONFIG:Coverage>:-fprofile-arcs>" )
add_compile_options( "$<$<CONFIG:Coverage>:-ftest-coverage>" )
# define compiler flags for the "Coverage" build type
add_link_options( "$<$<CONFIG:Coverage>:--coverage>" )
</code>
# define compiler flags for the "Coverage" build type
add_compile_options( "$<$<CONFIG:Coverage>:-g>" )
add_compile_options( "$<$<CONFIG:Coverage>:-Og>" )
add_compile_options( "$<$<CONFIG:Coverage>:-fprofile-arcs>" )
add_compile_options( "$<$<CONFIG:Coverage>:-ftest-coverage>" )
# define compiler flags for the "Coverage" build type
add_link_options( "$<$<CONFIG:Coverage>:--coverage>" )
I am using cmake from yocto kirkstone, and I installed it into “/opt/vhip-testing/”. To install these cmake files, I do this:
<code>cmake -B. -S.. --debug-find --install-prefix=/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/
<code>cmake -B. -S.. --debug-find --install-prefix=/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/
make install
</code>
cmake -B. -S.. --debug-find --install-prefix=/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/
make install
This installs only “VhipBuildConfig.cmake” and I get following output
<code>Running with debug output on for the `find` commands.
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_context-1.78.0/boost_context-config.cmake:102 (find_package):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_headers-1.78.0/boost_headersConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_headers-1.78.0/boost_headers-config.cmake
Call Stack (most recent call first):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package)
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_context-1.78.0/boost_context-config.cmake:102 (find_package):
Call Stack (most recent call first):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package)
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_context-1.78.0/boost_contextConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_context-1.78.0/boost_context-config.cmake
Call Stack (most recent call first):
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package):
Call Stack (most recent call first):
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_headers-1.78.0/boost_headersConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_headers-1.78.0/boost_headers-config.cmake
Call Stack (most recent call first):
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package):
Call Stack (most recent call first):
CMakeLists.txt:27 (find_package)
CMake Debug Log at CMakeLists.txt:27 (find_package):
find_package considered the following paths for boost_coroutine.cmake
/opt/vhip4-testing-sdk/sysroots/x86_64-oesdk-linux/usr/share/cmake-3.22/Modules/Findboost_coroutine.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutineConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake
CMake Debug Log at CMakeLists.txt:27 (find_package):
-- CMAKE_FRAMEWORK_PATH=""
-- CMAKE_APPBUNDLE_PATH=""
-- CMAKE_SYSTEM_PREFIX_PATH="/usr/local;/usr;/;/opt/vhip4-testing-sdk/sysroots/x86_64-oesdk-linux/usr;/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr;/usr/X11R6;/usr/pkg;/opt"
-- CMAKE_SYSTEM_FRAMEWORK_PATH=""
-- CMAKE_SYSTEM_APPBUNDLE_PATH=""
-- CMAKE_INSTALL_LIBDIR="lib"
-- CMAKE_CURRENT_BINARY_DIR="/home/dejovivl/ifm-source-code/vhip-sw-devel-ci/cmake/b"
-- CMAKE_INSTALL_LIBDIR="lib"
CMAKE_INSTALL_LIBDIR = lib
-- Build files have been written to: /home/dejovivl/ifm-source-code/vhip-sw-devel-ci/cmake/b
<code>Running with debug output on for the `find` commands.
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_context-1.78.0/boost_context-config.cmake:102 (find_package):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_headers-1.78.0/boost_headersConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_headers-1.78.0/boost_headers-config.cmake
Call Stack (most recent call first):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package)
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_context-1.78.0/boost_context-config.cmake:102 (find_package):
Call Stack (most recent call first):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package)
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_context-1.78.0/boost_contextConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_context-1.78.0/boost_context-config.cmake
Call Stack (most recent call first):
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package):
Call Stack (most recent call first):
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_headers-1.78.0/boost_headersConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_headers-1.78.0/boost_headers-config.cmake
Call Stack (most recent call first):
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package):
Call Stack (most recent call first):
CMakeLists.txt:27 (find_package)
CMake Debug Log at CMakeLists.txt:27 (find_package):
find_package considered the following paths for boost_coroutine.cmake
/opt/vhip4-testing-sdk/sysroots/x86_64-oesdk-linux/usr/share/cmake-3.22/Modules/Findboost_coroutine.cmake
The file was not found.
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutineConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake
CMake Debug Log at CMakeLists.txt:27 (find_package):
-- CMAKE_PREFIX_PATH=""
-- CMAKE_FRAMEWORK_PATH=""
-- CMAKE_APPBUNDLE_PATH=""
-- CMAKE_SYSTEM_PREFIX_PATH="/usr/local;/usr;/;/opt/vhip4-testing-sdk/sysroots/x86_64-oesdk-linux/usr;/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr;/usr/X11R6;/usr/pkg;/opt"
-- CMAKE_SYSTEM_FRAMEWORK_PATH=""
-- CMAKE_SYSTEM_APPBUNDLE_PATH=""
-- CMAKE_INSTALL_LIBDIR="lib"
-- CMAKE_CURRENT_BINARY_DIR="/home/dejovivl/ifm-source-code/vhip-sw-devel-ci/cmake/b"
-- CMAKE_INSTALL_LIBDIR="lib"
CMAKE_INSTALL_LIBDIR = lib
CMAKE_INSTALL_LIBDIR =
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dejovivl/ifm-source-code/vhip-sw-devel-ci/cmake/b
</code>
Running with debug output on for the `find` commands.
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_context-1.78.0/boost_context-config.cmake:102 (find_package):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_headers-1.78.0/boost_headersConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_headers-1.78.0/boost_headers-config.cmake
Call Stack (most recent call first):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package)
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_context-1.78.0/boost_context-config.cmake:102 (find_package):
Call Stack (most recent call first):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package)
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_context-1.78.0/boost_contextConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_context-1.78.0/boost_context-config.cmake
Call Stack (most recent call first):
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package):
Call Stack (most recent call first):
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package):
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_headers-1.78.0/boost_headersConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_headers-1.78.0/boost_headers-config.cmake
Call Stack (most recent call first):
CMakeLists.txt:27 (find_package)
CMake Debug Log at /opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake:102 (find_package):
Call Stack (most recent call first):
CMakeLists.txt:27 (find_package)
CMake Debug Log at CMakeLists.txt:27 (find_package):
find_package considered the following paths for boost_coroutine.cmake
/opt/vhip4-testing-sdk/sysroots/x86_64-oesdk-linux/usr/share/cmake-3.22/Modules/Findboost_coroutine.cmake
The file was not found.
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutineConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/lib/cmake/boost_coroutine-1.78.0/boost_coroutine-config.cmake
CMake Debug Log at CMakeLists.txt:27 (find_package):
-- CMAKE_PREFIX_PATH=""
-- CMAKE_FRAMEWORK_PATH=""
-- CMAKE_APPBUNDLE_PATH=""
-- CMAKE_SYSTEM_PREFIX_PATH="/usr/local;/usr;/;/opt/vhip4-testing-sdk/sysroots/x86_64-oesdk-linux/usr;/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr;/usr/X11R6;/usr/pkg;/opt"
-- CMAKE_SYSTEM_FRAMEWORK_PATH=""
-- CMAKE_SYSTEM_APPBUNDLE_PATH=""
-- CMAKE_INSTALL_LIBDIR="lib"
-- CMAKE_CURRENT_BINARY_DIR="/home/dejovivl/ifm-source-code/vhip-sw-devel-ci/cmake/b"
-- CMAKE_INSTALL_LIBDIR="lib"
CMAKE_INSTALL_LIBDIR = lib
CMAKE_INSTALL_LIBDIR =
-- Configuring done
-- Generating done
-- Build files have been written to: /home/dejovivl/ifm-source-code/vhip-sw-devel-ci/cmake/b
If I try find_package( VhipBuild )
in one of my projects, I get this:
<code> find_package considered the following locations for the Config module:
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/games/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/games/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/games/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/games/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/vhipbuild-config.cmake
CMake Warning at CMakeLists.txt:6 (find_package):
By not providing "FindVhipBuild.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"VhipBuild", but CMake did not find one.
Could not find a package configuration file provided by "VhipBuild" with
any of the following names:
Add the installation prefix of "VhipBuild" to CMAKE_PREFIX_PATH or set
"VhipBuild_DIR" to a directory containing one of the above files. If
"VhipBuild" provides a separate development package or SDK, be sure it has
CMake Debug Log at CMakeLists.txt:6 (find_package):
<code> find_package considered the following locations for the Config module:
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/games/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/games/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/games/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/games/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/vhipbuild-config.cmake
The file was not found.
CMake Warning at CMakeLists.txt:6 (find_package):
By not providing "FindVhipBuild.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"VhipBuild", but CMake did not find one.
Could not find a package configuration file provided by "VhipBuild" with
any of the following names:
VhipBuildConfig.cmake
vhipbuild-config.cmake
Add the installation prefix of "VhipBuild" to CMAKE_PREFIX_PATH or set
"VhipBuild_DIR" to a directory containing one of the above files. If
"VhipBuild" provides a separate development package or SDK, be sure it has
been installed.
CMake Debug Log at CMakeLists.txt:6 (find_package):
</code>
find_package considered the following locations for the Config module:
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/games/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/games/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/games/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/games/vhipbuild-config.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/VhipBuildConfig.cmake
/opt/vhip4-testing-sdk/sysroots/cortexa53-crypto-ifmlinux-linux/usr/vhipbuild-config.cmake
The file was not found.
CMake Warning at CMakeLists.txt:6 (find_package):
By not providing "FindVhipBuild.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"VhipBuild", but CMake did not find one.
Could not find a package configuration file provided by "VhipBuild" with
any of the following names:
VhipBuildConfig.cmake
vhipbuild-config.cmake
Add the installation prefix of "VhipBuild" to CMAKE_PREFIX_PATH or set
"VhipBuild_DIR" to a directory containing one of the above files. If
"VhipBuild" provides a separate development package or SDK, be sure it has
been installed.
CMake Debug Log at CMakeLists.txt:6 (find_package):
I looked further, and I found “Findboost_coroutine.cmake” which defines where to find “boost_coroutine-config.cmake”. Actually, every cmake package has a Find file in cmake modules.
The questions that I have:
- how to modify my CMakeList.txt so it installs both cmake files?
- do I have to write a Find cmake file and install it into cmake module directory?
- why cmake tries to find my config cmake file in weird locations? (“/”, “/usr” and “/usr/games”) and how to change that?