diff options
author | Brad King <brad.king@kitware.com> | 2017-08-29 19:21:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-08-29 19:30:07 (GMT) |
commit | 18454ea44d6a1fd2dbc613ad9c3fe941639563aa (patch) | |
tree | 7dd7d008d7734d70f5a76b2ab2810e6c025eb2cb /Tests/FindPackageModeMakefileTest | |
parent | fca4423786ba2c4a5ab0ec6c1a1cbac8cd8600b4 (diff) | |
download | CMake-18454ea44d6a1fd2dbc613ad9c3fe941639563aa.zip CMake-18454ea44d6a1fd2dbc613ad9c3fe941639563aa.tar.gz CMake-18454ea44d6a1fd2dbc613ad9c3fe941639563aa.tar.bz2 |
cmake: Fix --find-package mode with imported targets
The change in commit v3.9.0-rc1~116^2~6 (cmakemain: use script role for
-P, 2017-05-11) accidentally left project commands out of find-package
mode, causing packages that provide imported targets to break.
Fixes: #17124
Diffstat (limited to 'Tests/FindPackageModeMakefileTest')
-rw-r--r-- | Tests/FindPackageModeMakefileTest/FindFoo.cmake.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Tests/FindPackageModeMakefileTest/FindFoo.cmake.in b/Tests/FindPackageModeMakefileTest/FindFoo.cmake.in index dc62bac..2eb7b7a 100644 --- a/Tests/FindPackageModeMakefileTest/FindFoo.cmake.in +++ b/Tests/FindPackageModeMakefileTest/FindFoo.cmake.in @@ -5,5 +5,7 @@ find_path(FOO_INCLUDE_DIR NAMES foo.h HINTS "@CMAKE_CURRENT_SOURCE_DIR@" ) set(FOO_LIBRARIES ${FOO_LIBRARY}) set(FOO_INCLUDE_DIRS "${FOO_INCLUDE_DIR}" "/some/path/with a space/include" ) +add_library(Foo::Foo INTERFACE IMPORTED) + include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Foo DEFAULT_MSG FOO_LIBRARY FOO_INCLUDE_DIR ) |