Last active
March 1, 2019 19:41
-
-
Save ctnguyenvn/92d45b7221c61465f8a8ebeb774d0d1c to your computer and use it in GitHub Desktop.
template simple gtk cmake C on Clion Linux
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.7) | |
project(First C) // First -> project name | |
include(FindPkgConfig) | |
pkg_check_modules(GTK REQUIRED "gtk+-3.0") | |
include_directories(${GTK_INCLUDE_DIRS}) | |
link_directories(${GTK3_LIBRARY_DIRS}) | |
add_definitions(${GTK3_CFLAGS_OTHER}) | |
set(CMAKE_CXX_STANDARD 99) | |
set(SOURCE_FILES main.c) // main.c -> main file | |
add_executable(main.c ${SOURCE_FILES}) // main.c -> main file | |
target_link_libraries(main.c ${GTK3_LIBRARIES} pthread) // main.c -> main file, pthread -> add thread libraries |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment