mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-13 12:59:55 -05:00
Fix logic added by commit 359c500a24 (cmTarget: Raise error if imported
target location is not set, 2020-08-08, v3.19.0-rc1~273^2) to exclude
INTERFACE libraries from the policy. They have no location.
Fixes: #21470
11 lines
379 B
CMake
11 lines
379 B
CMake
# Prevent duplicate errors on some platforms.
|
|
set(CMAKE_IMPORT_LIBRARY_SUFFIX "placeholder")
|
|
|
|
add_library(unknown_lib UNKNOWN IMPORTED)
|
|
add_library(static_lib STATIC IMPORTED)
|
|
add_library(shared_lib SHARED IMPORTED)
|
|
add_library(interface_lib INTERFACE IMPORTED)
|
|
|
|
add_library(module MODULE module.cpp)
|
|
target_link_libraries(module unknown_lib static_lib shared_lib interface_lib)
|