Skip to content

Commit

Permalink
fix: debug and static builds should work.
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Leprince <[email protected]>
  • Loading branch information
pleprince committed Apr 3, 2024
1 parent 9799bf9 commit a06daec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmake/LibraryDefine.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ function(OPENEXR_DEFINE_LIBRARY libname)
message(STATUS ">> BLOSC2_LIB_NAME: ${BLOSC2_LIB_NAME}")
target_include_directories(${objlib} PRIVATE ${BLOSC2_INCLUDE_DIRS})
target_link_directories(${objlib} PRIVATE ${BLOSC2_LIB_DIR})
target_link_libraries(${objlib} PRIVATE "dl" ${BLOSC2_LIB_NAME}$<$<CONFIG:Debug>:${CMAKE_DEBUG_POSTFIX}>)
if(BUILD_SHARED_LIBS)
target_link_libraries(${objlib} PRIVATE "dl" ${BLOSC2_LIB_NAME}$<$<CONFIG:Debug>:${CMAKE_DEBUG_POSTFIX}>)
else()
target_link_libraries(${objlib} PUBLIC Blosc2::blosc2_static)
endif()
if(TARGET blosc2_static)
install(TARGETS blosc2_static EXPORT ${objlib})
endif()
Expand Down

0 comments on commit a06daec

Please sign in to comment.