Skip to content

Commit 731671b

Browse files
isurufFrancescAlted
authored andcommitted
Add imported target with pkg-config to support windows
1 parent a7cef5c commit 731671b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

blosc2/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ add_library(blosc2_ext MODULE ${blosc2_ext})
44
if(USE_SYSTEM_BLOSC2)
55
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
66
find_package(PkgConfig REQUIRED)
7-
pkg_check_modules(Blosc2 REQUIRED blosc2)
8-
target_include_directories(blosc2_ext PRIVATE ${Blosc2_INCLUDE_DIRS})
9-
target_link_libraries(blosc2_ext ${Blosc2_LDFLAGS})
7+
pkg_check_modules(Blosc2 REQUIRED IMPORTED_TARGET blosc2)
8+
target_link_libraries(blosc2_ext PkgConfig::Blosc2)
109
else()
1110
set(STATIC_LIB ON CACHE BOOL "Build a static version of the blosc library.")
1211
set(SHARED_LIB ON CACHE BOOL "Build a shared library version of the blosc library.")

0 commit comments

Comments
 (0)