summarylogtreecommitdiffstats
path: root/gtk3.patch
blob: 03770bbf0376646eec8c547c30dd9014ab3297ae (plain)
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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 95fec2e..baac21b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,7 +74,8 @@ endif()
 if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
 
   find_package(OpenGL REQUIRED)
-  find_package(GTK2 2.6 REQUIRED gtk)
+  find_package(PkgConfig REQUIRED)
+  pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
   find_package(X11 REQUIRED)
   find_package(SDL2 REQUIRED)
   find_library(XINPUT_LIBRARY libXi.so)
@@ -88,8 +89,8 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
       message(FATAL_ERROR "Could not find OpenGl libraries")
   endif()
 
-  if(NOT GTK2_FOUND)
-    message(FATAL_ERROR "Could not find GTK2.8 libraries")
+  if(NOT GTK3_FOUND)
+    message(FATAL_ERROR "Could not find GTK3.0 libraries")
   endif()
 
   if(NOT X11_FOUND)
@@ -101,13 +102,13 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
   endif()
 
   target_include_directories(Milton PRIVATE
-    ${GTK2_INCLUDE_DIRS}
+    ${GTK3_INCLUDE_DIRS}
     ${X11_INCLUDE_DIR}
     ${OPENGL_INCLUDE_DIR}
   )
 
   target_link_libraries(Milton
-    ${GTK2_LIBRARIES}
+    ${GTK3_LIBRARIES}
     ${X11_LIBRARIES}
     ${OPENGL_LIBRARIES}
     ${XINPUT_LIBRARY}