You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
521 B
15 lines
521 B
enable_language(C)
|
|
|
|
add_library(mainlib STATIC foo.c)
|
|
target_compile_definitions(mainlib INTERFACE
|
|
$<BUILD_LOCAL_INTERFACE:BUILD_LOCAL_INTERFACE>
|
|
$<BUILD_INTERFACE:BUILD_INTERFACE>
|
|
$<INSTALL_INTERFACE:INSTALL_INTERFACE>
|
|
)
|
|
add_library(locallib STATIC locallib.c)
|
|
target_link_libraries(locallib PRIVATE mainlib)
|
|
|
|
install(TARGETS mainlib EXPORT export)
|
|
install(EXPORT export DESTINATION lib/cmake/install FILE install-config.cmake NAMESPACE install::)
|
|
export(EXPORT export FILE build-config.cmake NAMESPACE build::)
|