mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Installing a module target without a LIBRARY DESTINATION no longer raises an error. On DLL platforms, the default destination is the RUNTIME default. Otherwise, the LIBRARY default is used. Closes: #27759
14 lines
502 B
CMake
14 lines
502 B
CMake
enable_language(C)
|
|
|
|
# A module library defaults to the runtime destination on DLL platforms and to
|
|
# the library destination elsewhere, but it is always a LIBRARY artifact:
|
|
# LIBRARY DESTINATION overrides the default on every platform, and RUNTIME
|
|
# DESTINATION never applies to it.
|
|
add_library(mod1 MODULE obj1.c)
|
|
add_library(mod2 MODULE obj2.c)
|
|
add_library(mod3 MODULE obj3.c)
|
|
|
|
install(TARGETS mod1)
|
|
install(TARGETS mod2 LIBRARY DESTINATION plugins)
|
|
install(TARGETS mod3 RUNTIME DESTINATION notused)
|