vcpkg/ports/fastcdr/install-cmake.patch
Reyzal 667f34314f Add port quirc (#2949)
* fixed SHA512 sum of the package realsense2

* Add port quirc for #2899

* Add port FastCDR for #2953
2018-03-10 02:59:43 -08:00

27 lines
1.1 KiB
Diff

diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
index 46d6f20..5d73ec5 100644
--- a/src/cpp/CMakeLists.txt
+++ b/src/cpp/CMakeLists.txt
@@ -139,7 +139,12 @@ if(MSVC OR MSVC_IDE)
set(DIR_EXTENSION "/${MSVC_ARCH}")
endif()
- install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_static
+ if(BUILD_SHARED_LIBS)
+ set(PROJECT_TARGETS ${PROJECT_NAME})
+ else()
+ set(PROJECT_TARGETS ${PROJECT_NAME}_static)
+ endif()
+ install(TARGETS ${PROJECT_TARGETS}
EXPORT ${PROJECT_NAME}Targets
RUNTIME DESTINATION ${BIN_INSTALL_DIR}${DIR_EXTENSION}
LIBRARY DESTINATION ${LIB_INSTALL_DIR}${DIR_EXTENSION}
@@ -147,7 +152,6 @@ if(MSVC OR MSVC_IDE)
COMPONENT libraries_${MSVC_ARCH}
)
- export(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_static FILE ${PROJECT_BINARY_DIR}/cmake/config/${PROJECT_NAME}Targets.cmake)
install(EXPORT ${PROJECT_NAME}Targets
DESTINATION ${LIB_INSTALL_DIR}${DIR_EXTENSION}/${PROJECT_NAME}/cmake
COMPONENT cmake