-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #129 from HappySeaFox/fix/fix-release-debug-libs-#128
Fix/fix release debug libs #128
- Loading branch information
Showing
4 changed files
with
36 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
macro(sail_find_dependencies) | ||
find_library(JPEG2000_LIBRARY jasper) | ||
find_library(JPEG2000_RELEASE_LIBRARY NAMES jasper) | ||
find_library(JPEG2000_DEBUG_LIBRARY NAMES jasperd jasper) | ||
find_path(JPEG2000_INCLUDE_DIRS jasper/jasper.h) | ||
|
||
if (NOT JPEG2000_LIBRARY OR NOT JPEG2000_INCLUDE_DIRS) | ||
if ((NOT JPEG2000_RELEASE_LIBRARY AND NOT JPEG2000_DEBUG_LIBRARY) OR NOT JPEG2000_INCLUDE_DIRS) | ||
return() | ||
endif() | ||
|
||
set(JPEG2000_LIBRARY optimized ${JPEG2000_RELEASE_LIBRARY} debug ${JPEG2000_DEBUG_LIBRARY}) | ||
|
||
set(sail_jpeg2000_include_dirs ${JPEG2000_INCLUDE_DIRS}) | ||
set(sail_jpeg2000_libs ${JPEG2000_LIBRARY}) | ||
|
||
# This will add the following CMake rules to the CMake config for static builds so a client | ||
# application links against the required dependencies: | ||
# | ||
# find_library(jasper_LIBRARY jasper REQUIRED) | ||
# set_property(TARGET SAIL::sail-codecs APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${jasper_LIBRARY}) | ||
# find_library(jasper_RELEASE_LIBRARY NAMES jasper) | ||
# find_library(jasper_DEBUG_LIBRARY NAMES jasperd jasper) | ||
# set_property(TARGET SAIL::sail-codecs APPEND PROPERTY INTERFACE_LINK_LIBRARIES $<$<CONFIG:Release>:${jasper_RELEASE_LIBRARY}> $<$<CONFIG:Debug>:${jasper_DEBUG_LIBRARY}>) | ||
# | ||
set(SAIL_CODECS_FIND_DEPENDENCIES ${SAIL_CODECS_FIND_DEPENDENCIES} "find_library,jasper," PARENT_SCOPE) | ||
set(SAIL_CODECS_FIND_DEPENDENCIES ${SAIL_CODECS_FIND_DEPENDENCIES} "find_library,jasper,jasperd" PARENT_SCOPE) | ||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters