-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
52 lines (35 loc) · 1.18 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cmake_minimum_required(VERSION 3.10)
# Project name
project(xenakisAnalogiqueGUI VERSION 1.0 LANGUAGES C)
# Create a sources variable with a link to all cpp files to compile
set(SOURCES
src/main.c
)
# Find GTK4 using pkg-config
find_package(PkgConfig REQUIRED)
pkg_check_modules(GTK4 REQUIRED gtk4)
# Include GTK4 directories
include_directories(${GTK4_INCLUDE_DIRS})
# Define the executable
add_executable(xenakisAnalogiqueGUI ${SOURCES})
# Link GTK4 libraries
target_link_libraries(xenakisAnalogiqueGUI ${GTK4_LIBRARIES})
# Add compile options from pkg-config
target_compile_options(xenakisAnalogiqueGUI PRIVATE ${GTK4_CFLAGS_OTHER})
# Set the directories that should be included in the build command for this target
target_include_directories(xenakisAnalogiqueGUI
PRIVATE
${PROJECT_SOURCE_DIR}/include
)
# SET CSOUND LIB
set (CS_LIB csound64)
find_library(CS_LIB_PATH ${CS_LIB})
find_path(CSOUND_H_PATH csound.h)
if(NOT CS_LIB_PATH)
message(ERROR "Unable to find library: ${CS_LIB}")
endif()
if(NOT CSOUND_H_PATH)
message(ERROR "Unable to find csound.h.")
endif()
include_directories(${CSOUND_H_PATH})
target_link_libraries(xenakisAnalogiqueGUI ${CS_LIB_PATH})