Closed lkotsonis closed 4 years ago
Works fine, just use the regular CMake mechnisms for including third party libraries.
What I do is to use pkgconfig, in the top level CMakeLists.txt:
# Include useful scripts for CMake
find_package(PkgConfig REQUIRED)
# These calls create special `PkgConfig::<MODULE>` variables
pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0)
pkg_check_modules(WEBKIT REQUIRED IMPORTED_TARGET webkit2gtk-4.0)
pkg_check_modules(GLEW REQUIRED IMPORTED_TARGET glew)
and then use them for linking like this:
target_link_libraries(JammerNetzClient
${JUCE_LIBRARIES}
PkgConfig::WEBKIT
PkgConfig::GTK
PkgConfig::GLEW
...more stuff
)
Alright thanks for the hint, it worked. I am in the process of integrating this to the cmake files so that dependency changes are automatically grabbed through the module text format rather than the user having to manually add them. Let me know if this makes sense to make a PR out of.
What is the status for use on Linux? I seem to be having issues because freetype and gtk are not included properly.