Skip to content

Fix dynamic and static linking#329

Merged
TheAssassin merged 2 commits into
masterfrom
fix-dynamic-and-static-linking
Apr 27, 2026
Merged

Fix dynamic and static linking#329
TheAssassin merged 2 commits into
masterfrom
fix-dynamic-and-static-linking

Conversation

@TheAssassin
Copy link
Copy Markdown
Member

See https://cmake.org/cmake/help/latest/prop_tgt/INTERFACE_LINK_DIRECTORIES.html. This should work on any platform. I might try later on FreeBSD.

Copy link
Copy Markdown
Contributor

@arrowd arrowd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this fixes the linking problem for me!

Note that I had to do this too:

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f70a622..d01478e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -53,7 +53,7 @@ endif()
 
 
 add_executable(plugin_test plugin_test_main.cpp)
-target_link_libraries(plugin_test linuxdeploy_plugin)
+target_link_libraries(plugin_test linuxdeploy_plugin CImg)
 set_target_properties(plugin_test PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
 
 add_executable(appdir_test appdir_test_main.cpp ../include/linuxdeploy/util/assert.h)

Comment thread cmake/Modules/FindCImg.cmake Outdated
Thanks @arrowd for assisting!
@TheAssassin TheAssassin force-pushed the fix-dynamic-and-static-linking branch from b960302 to ec9824f Compare April 27, 2026 00:46
@TheAssassin TheAssassin enabled auto-merge (rebase) April 27, 2026 00:46
@TheAssassin TheAssassin merged commit 3fdc95e into master Apr 27, 2026
12 checks passed
@TheAssassin
Copy link
Copy Markdown
Member Author

Thanks @arrowd for bringing up the problem and assisting with the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants