Created
January 9, 2020 15:50
-
-
Save sizmailov/66ba016df2c4e51bd72f89d01eda9681 to your computer and use it in GitHub Desktop.
CMake + GTK3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.13) | |
project(example-gtk3) | |
set(CMAKE_CXX_STANDARD 11) | |
find_package(PkgConfig REQUIRED) | |
pkg_check_modules(GTK3 | |
REQUIRED | |
gtkmm-3.0>=3.22 | |
gdkmm-3.0>=3.22 | |
gtk+-3.0>=3.22 | |
gdk-3.0>=3.22 | |
gdl-3.0>=3.4 | |
) | |
add_library(Gtk3 INTERFACE) | |
target_compile_options(Gtk3 INTERFACE ${GTK3_CFLAGS_OTHER}) | |
target_link_libraries(Gtk3 INTERFACE ${GTK3_LIBRARIES}) | |
target_include_directories(Gtk3 INTERFACE ${GTK3_INCLUDE_DIRS}) | |
add_executable(example main.cpp) | |
target_link_libraries(example Gtk3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment