Skip to content

Commit

Permalink
Fix install paths
Browse files Browse the repository at this point in the history
  • Loading branch information
navrocky committed Sep 2, 2020
1 parent 39ca3ac commit 78efacf
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,23 @@ set(TEST_SOURCES

configure_file(version.h.in version.h)

set(DEST_HEADERS_DIR include/ws2811)
set(DEST_LIB_DIR lib)

if(BUILD_SHARED)
add_library(${LIB_TARGET} SHARED ${LIB_SOURCES})
set_target_properties(${LIB_TARGET} PROPERTIES PUBLIC_HEADER "${LIB_PUBLIC_HEADERS}")
install(TARGETS ${LIB_TARGET} LIBRARY PUBLIC_HEADER)
install(TARGETS ${LIB_TARGET}
LIBRARY DESTINATION ${DEST_LIB_DIR}
PUBLIC_HEADER DESTINATION ${DEST_HEADERS_DIR}
)
else()
add_library(${LIB_TARGET} ${LIB_SOURCES})
set_target_properties(${LIB_TARGET} PROPERTIES PUBLIC_HEADER "${LIB_PUBLIC_HEADERS}")
install(TARGETS ${LIB_TARGET} ARCHIVE PUBLIC_HEADER)
install(TARGETS ${LIB_TARGET}
ARCHIVE DESTINATION ${DEST_LIB_DIR}
PUBLIC_HEADER DESTINATION ${DEST_HEADERS_DIR}
)
endif()

if(BUILD_TEST)
Expand Down

0 comments on commit 78efacf

Please sign in to comment.