Tutorial: Easily supporting CMake install and find_package()
www.foonathan.net › 2016 › 03Mar 03, 2016 · Then we add the install() commands: # in tool/CMakeLists.txt install(TARGETS my_library_tool DESTINATION "${tool_dest}") # in src/CMakeLists.txt install(TARGETS my_library DESTINATION "${main_lib_dest}") install(FILES ${header} DESTINATION "${include_dest}") install(FILES ${CMAKE_CURRENT_BINARY_DIR}/config_impl.hpp DESTINATION "${include_dest}")
install — CMake 3.23.0-rc4 Documentation
cmake.org › cmake › helpThe install() command generates a file, cmake_install.cmake, inside the build directory, which is used internally by the generated install target and by CPack. You can also invoke this script manually with cmake-P. This script accepts several variables: COMPONENT. Set this variable to install only a single CPack component as opposed to all of them.
cmake Tutorial => Getting started with cmake
https://riptutorial.com/cmakeCMake Installation Head over to CMake download page and get a binary for your operating system, e.g. Windows, Linux, or Mac OS X. On Windows double click the binary to install. On Linux run the binary from a terminal. On Linux, you can also install the packages from the distribution's package manager.