blob: 8897e90c15d4c09a6f135273ccc42da0c9dcbff6 [file] [log] [blame] [edit]
--- libicsneo/CMakeLists.txt.orig 2019-05-17 07:53:21.825172800 +0300
+++ libicsneo/CMakeLists.txt 2019-05-17 08:13:27.505901400 +0300
@@ -104,6 +104,7 @@
)
set(SRC_FILES ${COMMON_SRC} ${PLATFORM_SRC})
+set(INSTALLTARGETS "")
# Generate build info header
execute_process(
@@ -142,6 +143,7 @@
${CMAKE_CURRENT_SOURCE_DIR}/include
)
set_property(TARGET icsneocpp PROPERTY POSITION_INDEPENDENT_CODE ON)
+list(APPEND INSTALLTARGETS icsneocpp)
# libftdi
if(NOT WIN32)
@@ -171,6 +173,7 @@
${CMAKE_CURRENT_SOURCE_DIR}/include
)
target_link_libraries(icsneoc PRIVATE icsneocpp)
+list(APPEND INSTALLTARGETS icsneoc)
add_library(icsneoc-static STATIC api/icsneoc/icsneoc.cpp)
target_include_directories(icsneoc-static
@@ -181,6 +184,7 @@
${CMAKE_CURRENT_SOURCE_DIR}/include
)
target_link_libraries(icsneoc-static PUBLIC icsneocpp)
+list(APPEND INSTALLTARGETS icsneoc-static)
add_library(icsneolegacy SHARED
api/icsneolegacy/icsneolegacy.cpp
@@ -195,6 +199,7 @@
${CMAKE_CURRENT_SOURCE_DIR}/include
)
target_link_libraries(icsneolegacy PRIVATE icsneocpp)
+list(APPEND INSTALLTARGETS icsneolegacy)
target_compile_features(icsneocpp PUBLIC cxx_auto_type cxx_constexpr cxx_lambdas cxx_nullptr cxx_range_for cxx_rvalue_references cxx_sizeof_member cxx_strong_enums)
target_compile_features(icsneoc PRIVATE cxx_auto_type cxx_constexpr cxx_lambdas cxx_nullptr cxx_range_for cxx_rvalue_references cxx_sizeof_member cxx_strong_enums)
@@ -209,6 +214,13 @@
target_link_libraries(icsneocpp PUBLIC ${CMAKE_THREAD_LIBS_INIT})
endif()
+install(TARGETS ${INSTALLTARGETS}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+
+install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)