Skip to content

Commit ec9824f

Browse files
committed
Fix static build on FreeBSD
Thanks @arrowd for assisting!
1 parent 49ee6a7 commit ec9824f

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎cmake/Modules/FindCImg.cmake‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ else()
7070
set(CImg_INCLUDE_DIR ${CIMG_H_DIR} CACHE STRING "")
7171
set(CImg_INCLUDE_DIRS ${CImg_INCLUDE_DIR})
7272
set(CImg_LIBRARIES "${PNG_LIBRARY};${JPEG_LIBRARIES}")
73+
set(CImg_LIBRARY_DIRS "${libpng_LIBRARY_DIRS};${libjpeg_LIBRARY_DIRS}")
7374
set(CImg_DEFINITIONS "cimg_display=0;cimg_use_png=1;cimg_use_jpeg=1")
7475

7576
file(READ "${CIMG_H_DIR}/CImg.h" header)
@@ -82,6 +83,7 @@ else()
8283
add_library(CImg INTERFACE)
8384
set_property(TARGET CImg PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${CIMG_H_DIR};${PNG_INCLUDE_DIR};${JPEG_INCLUDE_DIR}")
8485
set_property(TARGET CImg PROPERTY INTERFACE_LINK_LIBRARIES "${CImg_LIBRARIES}")
86+
set_property(TARGET CImg PROPERTY INTERFACE_LINK_DIRECTORIES "${CImg_LIBRARY_DIRS}")
8587
set_property(TARGET CImg PROPERTY INTERFACE_COMPILE_DEFINITIONS "${CImg_DEFINITIONS}")
8688
endif()
8789
endif()

‎src/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ endif()
5353

5454

5555
add_executable(plugin_test plugin_test_main.cpp)
56-
target_link_libraries(plugin_test linuxdeploy_plugin)
56+
target_link_libraries(plugin_test linuxdeploy_plugin CImg)
5757
set_target_properties(plugin_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
5858

5959
add_executable(appdir_test appdir_test_main.cpp ../include/linuxdeploy/util/assert.h)

0 commit comments

Comments
 (0)