mirror of
https://github.com/cuberite/libevent.git
synced 2025-08-04 01:36:23 -04:00
cmake: install shared library only if it was requested
$ cmake -DEVENT__LIBRARY_TYPE=static .. ... CMake Error: Error evaluating generator expression: $<TARGET_FILE_DIR:event_core_shared> No target "event_core_shared" Fixes: #853 Fixes: 669a53f3 ("cmake: set library names to be the same as with autotools") (cherry picked from commit 55d1e20e1a5dbd1188f4143968f7cafee33edc0d)
This commit is contained in:
parent
9559349cbc
commit
596855f7af
@ -149,7 +149,7 @@ macro(add_event_library LIB_NAME)
|
|||||||
PUBLIC_HEADER DESTINATION "include/event2"
|
PUBLIC_HEADER DESTINATION "include/event2"
|
||||||
COMPONENT dev
|
COMPONENT dev
|
||||||
)
|
)
|
||||||
if (NOT WIN32)
|
if (NOT WIN32 AND ${EVENT_LIBRARY_SHARED})
|
||||||
install(FILES
|
install(FILES
|
||||||
"$<TARGET_FILE_DIR:${LIB_NAME}_shared>/${LIB_LINK_NAME}"
|
"$<TARGET_FILE_DIR:${LIB_NAME}_shared>/${LIB_LINK_NAME}"
|
||||||
DESTINATION "lib"
|
DESTINATION "lib"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user