
When install(TARGETS) and install(EXPORT) were called with file sets and an absolute CMAKE_INSTALL_INCLUDEDIR, "${_IMPORT_PREFIX}/" was still being prepended to the base directory and files, resulting in incorrect paths. Don't prepend this when absolute paths are used. Fixes: #25010
10 lines
290 B
CMake
10 lines
290 B
CMake
enable_language(CXX)
|
|
|
|
get_filename_component(CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}" DIRECTORY)
|
|
string(APPEND CMAKE_PREFIX_PATH "/FileSetAbsoluteInstallIncludeDirExport-build/install")
|
|
|
|
find_package(lib1 REQUIRED)
|
|
|
|
add_executable(exe main.cpp)
|
|
target_link_libraries(exe PRIVATE lib1::lib1)
|