diff --git a/CMakeLists.txt b/CMakeLists.txt index ad0a65dc..105c3fbc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,17 +33,20 @@ file(GLOB_RECURSE MCPP_SOURCE_FILES ${MCPP_SRC_DIR}/*.cpp) # Library build add_library(${PROJECT_NAME} SHARED ${MCPP_INCLUDE_FILES} ${MCPP_SOURCE_FILES}) +set(LIB_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}) +set(HEADER_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}) + set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 1 PUBLIC_HEADER "${MCPP_INCLUDE_FILES}" - INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib" + INSTALL_NAME_DIR ${LIB_INSTALL_DIR} ) install(TARGETS ${PROJECT_NAME} - LIBRARY DESTINATION lib - PUBLIC_HEADER DESTINATION include/${PROJECT_NAME} + LIBRARY DESTINATION ${LIB_INSTALL_DIR} + PUBLIC_HEADER DESTINATION ${HEADER_INSTALL_DIR} ) # CPack setup