mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-23 06:17:49 +08:00
67 lines
2.7 KiB
Diff
67 lines
2.7 KiB
Diff
diff --git a/blosc/CMakeLists.txt b/blosc/CMakeLists.txt
|
|
index f4e5c29..24641ad 100644
|
|
--- a/blosc/CMakeLists.txt
|
|
+++ b/blosc/CMakeLists.txt
|
|
@@ -122,14 +122,14 @@ endif (NOT DEACTIVATE_ZSTD)
|
|
|
|
# targets
|
|
if (BUILD_SHARED)
|
|
- add_library(blosc_shared SHARED ${SOURCES})
|
|
- set_target_properties(blosc_shared PROPERTIES OUTPUT_NAME blosc)
|
|
- set_target_properties(blosc_shared PROPERTIES
|
|
+ add_library(blosc SHARED ${SOURCES})
|
|
+ #set_target_properties(blosc_shared PROPERTIES OUTPUT_NAME blosc)
|
|
+ set_target_properties(blosc PROPERTIES
|
|
VERSION ${version_string}
|
|
SOVERSION 1 # Change this when an ABI change happens
|
|
)
|
|
set_property(
|
|
- TARGET blosc_shared
|
|
+ TARGET blosc
|
|
APPEND PROPERTY COMPILE_DEFINITIONS BLOSC_SHARED_LIBRARY)
|
|
endif()
|
|
|
|
@@ -192,8 +192,8 @@ if (BUILD_TESTS)
|
|
endif()
|
|
|
|
if (BUILD_SHARED)
|
|
- target_link_libraries(blosc_shared ${LIBS})
|
|
- target_include_directories(blosc_shared PUBLIC ${BLOSC_INCLUDE_DIRS})
|
|
+ target_link_libraries(blosc ${LIBS})
|
|
+ target_include_directories(blosc PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
|
endif()
|
|
|
|
if (BUILD_TESTS)
|
|
@@ -202,22 +202,24 @@ if (BUILD_TESTS)
|
|
endif()
|
|
|
|
if(BUILD_STATIC)
|
|
- add_library(blosc_static STATIC ${SOURCES})
|
|
- set_target_properties(blosc_static PROPERTIES OUTPUT_NAME blosc)
|
|
+ add_library(blosc STATIC ${SOURCES})
|
|
+ #set_target_properties(blosc_static PROPERTIES OUTPUT_NAME blosc)
|
|
if (MSVC)
|
|
- set_target_properties(blosc_static PROPERTIES PREFIX lib)
|
|
+ #set_target_properties(blosc_static PROPERTIES PREFIX lib)
|
|
endif()
|
|
- target_link_libraries(blosc_static ${LIBS})
|
|
- target_include_directories(blosc_static PUBLIC ${BLOSC_INCLUDE_DIRS})
|
|
+ target_link_libraries(blosc ${LIBS})
|
|
+ target_include_directories(blosc PUBLIC $<INSTALL_INTERFACE:include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
|
|
endif(BUILD_STATIC)
|
|
|
|
# install
|
|
if(BLOSC_INSTALL)
|
|
install(FILES blosc.h blosc-export.h DESTINATION include COMPONENT DEV)
|
|
if(BUILD_SHARED)
|
|
- install(TARGETS blosc_shared LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin COMPONENT LIB)
|
|
+ install(TARGETS blosc EXPORT blosc-config RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
|
endif(BUILD_SHARED)
|
|
if(BUILD_STATIC)
|
|
- install(TARGETS blosc_static LIBRARY DESTINATION ${lib_dir} ARCHIVE DESTINATION ${lib_dir} RUNTIME DESTINATION bin COMPONENT DEV)
|
|
+ install(TARGETS blosc EXPORT blosc-config RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)
|
|
endif(BUILD_STATIC)
|
|
endif(BLOSC_INSTALL)
|
|
+
|
|
+install(EXPORT blosc-config DESTINATION share/cmake/blosc)
|