mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 22:30:13 -06:00
Some platforms, Apple or Windows for instance, do not require to duplicate static libraries to resolve mutual dependencies. Moreover, Xcode version 15 emits a warning if a library is duplicated. On Windows, enable a better control of libraries order. Fixes: #20722, #25297
10 lines
188 B
CMake
10 lines
188 B
CMake
|
|
enable_language(C)
|
|
|
|
set(CMAKE_C_LINK_LIBRARIES_PROCESSING WRONG=REVERSE UNICITY=WRONG)
|
|
|
|
add_library(lib STATIC lib.c)
|
|
|
|
add_executable(main main.c)
|
|
target_link_libraries(main PRIVATE lib)
|