Skip to content

Commit

Permalink
CMake: remove link library paths
Browse files Browse the repository at this point in the history
  • Loading branch information
kmilos committed Jul 3, 2023
1 parent 445cfac commit fea165e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libheif/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ if (LIBSHARPYUV_FOUND)
message("Compiling in 'libsharpyuv'")
target_compile_definitions(heif PUBLIC HAVE_LIBSHARPYUV=1)
target_include_directories(heif PRIVATE ${LIBSHARPYUV_INCLUDE_DIRS})
target_link_libraries(heif PRIVATE ${LIBSHARPYUV_LIBRARIES} ${LIBSHARPYUV_LINKDIR})
target_link_libraries(heif PRIVATE ${LIBSHARPYUV_LIBRARIES})
else ()
message("Not compiling 'libsharpyuv'")
endif ()
Expand Down
8 changes: 2 additions & 6 deletions libheif/plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@

macro(plugin_compilation name varName optionName defineName)
if (${varName}_FOUND AND WITH_${optionName})
if (NOT "${${varName}_LIBRARY_DIRS}" STREQUAL "")
set(${varName}_LINKDIR "-L${${varName}_LIBRARY_DIRS}")
endif ()

if (PLUGIN_LOADING_SUPPORTED_AND_ENABLED AND WITH_${optionName}_PLUGIN)
message("Compiling '" ${name} "' as dynamic plugin")
add_library(heif-${name}
Expand All @@ -21,7 +17,7 @@ macro(plugin_compilation name varName optionName defineName)
HAVE_VISIBILITY)
target_compile_definitions(heif-${name} PRIVATE PLUGIN_${defineName}=1)
target_include_directories(heif-${name} PRIVATE ${PROJECT_SOURCE_DIR} ${libheif_BINARY_DIR} ${libheif_SOURCE_DIR} ${${varName}_INCLUDE_DIRS})
target_link_libraries(heif-${name} PRIVATE ${${varName}_LIBRARIES} ${${varName}_LINKDIR} heif)
target_link_libraries(heif-${name} PRIVATE ${${varName}_LIBRARIES} heif)

install(TARGETS heif-${name}
LIBRARY DESTINATION ${PLUGIN_DIRECTORY}
Expand All @@ -31,7 +27,7 @@ macro(plugin_compilation name varName optionName defineName)
target_sources(heif PRIVATE ${${optionName}_sources})
target_compile_definitions(heif PRIVATE HAVE_${defineName}=1)
target_include_directories(heif PRIVATE ${${varName}_INCLUDE_DIRS})
target_link_libraries(heif PRIVATE ${${varName}_LIBRARIES} ${${varName}_LINKDIR})
target_link_libraries(heif PRIVATE ${${varName}_LIBRARIES})
endif ()

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${varName}_CFLAGS}")
Expand Down

0 comments on commit fea165e

Please sign in to comment.