Replies: 1 comment
-
Cmkr purposefully does not support [variables]
CMAKE_MODULE_PATH = "cmake"
# Looks for cmake/FindGTK4.cmake
[find-package.GTK4]
[target.mygui]
type = "executable"
sources = ["src/main.cpp"]
link-libraries = ["GTK4::gtk4"] You will then need to write # FindGTK4.cmake - Find GTK4 package using pkg-config and create imported targets.
# Check if GTK4 is already found
if(TARGET GTK4::gtk4)
set(GTK4_FOUND ON)
return()
endif()
# Find the GTK4 package using pkg-config
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK4 REQUIRED gtk4)
# Create the imported target
add_library(GTK4::gtk4 INTERFACE IMPORTED)
# Set the include directories
set_target_properties(GTK4::gtk4 PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${GTK4_INCLUDE_DIRS}"
INTERFACE_COMPILE_OPTIONS "${GTK4_CFLAGS_OTHER}"
INTERFACE_LINK_LIBRARIES "${GTK4_LIBRARIES}"
) The documentation for |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
in the gtk compilation tutorial it uses gcc together with
pkg-config
, but it seems thatcmkr
does not support this module: https://cmake.org/cmake/help/latest/module/FindPkgConfig.htmlthe command would be this
gcc $( pkg-config --cflags gtk4 ) -o example-0 example-0.c $( pkg-config --libs gtk4 )
, how to translate this to cmkr?Beta Was this translation helpful? Give feedback.
All reactions