CMake: only install static libs if built #625

pull/632/head
nick black 4 years ago
parent 00d63c0b69
commit fc998510a0
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -335,22 +335,6 @@ install(FILES ${NOTCURSES_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/notcu
install(FILES ${NCPP_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ncpp)
install(FILES ${NCPP_INTERNAL_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ncpp/internal)
install(
TARGETS notcurses++
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Libraries
NAMELINK_COMPONENT Development
)
install(
TARGETS notcurses++-static
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Libraries
NAMELINK_COMPONENT Development
)
# notcurses-demo
file(GLOB DEMOSRCS CONFIGURE_DEPENDS src/demo/*.c)
add_executable(notcurses-demo ${DEMOSRCS})
@ -714,9 +698,19 @@ install(TARGETS notcurses-tetris DESTINATION bin)
if(${USE_FFMPEG} OR ${USE_OIIO})
install(TARGETS notcurses-view DESTINATION bin)
endif()
install(TARGETS notcurses notcurses-static
install(TARGETS notcurses notcurses++
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Libraries
NAMELINK_COMPONENT Development
)
if(${USE_STATIC})
install(
TARGETS notcurses-static notcurses++-static
LIBRARY
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT Libraries
NAMELINK_COMPONENT Development
)
endif()

@ -153,7 +153,8 @@ but must be `Debug` for use of `USE_COVERAGE`.
* `USE_PYTHON`: build the Python wrappers
* `USE_RUST`: build the Rust wrappers
* `USE_NETWORK`: allow `cargo` to use the network for building Rust
* `USE_COVERAGE`: build coverage support (for developers). Requires use of Clang.
* `USE_STATIC`: build static libraries (in addition to shared ones)
* `USE_COVERAGE`: build coverage support (for developers, requires use of Clang)
## Included tools

Loading…
Cancel
Save