mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -06:00
Previously we would synthesize <TARGET_NAME>-NOTFOUND as the location. This would then end up on the link line and cause build failures. Policy CMP0110 is added to control this behaviour. Fixes #19080, #19943.
10 lines
321 B
CMake
10 lines
321 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_executable(executable main.cpp)
|
|
target_link_libraries(executable unknown_lib static_lib shared_lib)
|