Skip to content

Commit

Permalink
Refactor install to allow overrides
Browse files Browse the repository at this point in the history
Resolves #19
  • Loading branch information
szechyjs committed Dec 3, 2017
1 parent e2d84c1 commit 1b39cc9
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,20 @@ ADD_LIBRARY(mbe-shared SHARED ${SRCS})
TARGET_LINK_LIBRARIES(mbe-static m)
TARGET_LINK_LIBRARIES(mbe-shared m)

install(TARGETS mbe-static mbe-shared DESTINATION lib)
install (FILES "${PROJECT_SOURCE_DIR}/mbelib.h" DESTINATION include)

set_target_properties(mbe-static mbe-shared PROPERTIES OUTPUT_NAME mbe
VERSION 1.0 SOVERSION 1 INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib )
include(GNUInstallDirs)

set_target_properties(mbe-static mbe-shared
PROPERTIES
OUTPUT_NAME mbe
VERSION 1.0
SOVERSION 1
INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR}
PUBLIC_HEADER "mbelib.h")

install(TARGETS mbe-static mbe-shared
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

# uninstall target
configure_file(
Expand Down

0 comments on commit 1b39cc9

Please sign in to comment.