adding in build setup and linking external library
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
project(gtk_hello_world)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
pkg_check_modules(GTKMM gtkmm-4.0)
|
||||
|
||||
set (source_dir "${PROJECT_SOURCE_DIR}/src")
|
||||
file(GLOB source_files "${source_dir}/*.cpp")
|
||||
|
||||
link_directories(${GTKMM_LIBRARY_DIRS})
|
||||
include_directories(${GTKMM_INCLUDE_DIRS})
|
||||
|
||||
add_executable(${PROJECT_NAME} ${source_files})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} ${GTKMM_LIBRARIES})
|
||||
Reference in New Issue
Block a user