You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
535 B

# Create ./symlink pointing back here.
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
PackageRoot "${CMAKE_CURRENT_SOURCE_DIR}/symlink")
# Make find_package search through the symlink.
set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/symlink")
# Test preservation of symlinks.
find_package(Resolved)
message(WARNING "${Resolved_DIR}")
# Test resolving symlinks.
set(CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS ON)
find_package(Resolved)
message(WARNING "${Resolved_DIR}")
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/symlink")