Fix the build on my system
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 16 Jul 2017 10:00:19 +0000 (20:00 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 16 Jul 2017 10:46:49 +0000 (20:46 +1000)
CMakeLists.txt
libs/gtkutil/CMakeLists.txt
libs/l_net/l_net.c
libs/uilib/CMakeLists.txt
radiant/CMakeLists.txt
radiant/main.cpp

index dda42c7..78efba9 100644 (file)
@@ -63,6 +63,7 @@ endif ()
 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}   -fno-strict-aliasing")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing -fno-exceptions -fno-rtti")
 set(CMAKE_POSITION_INDEPENDENT_CODE 1)
+set(GTK_NS "GTK2" CACHE STRING "GTK variable prefix")
 
 #-----------------------------------------------------------------------
 # Defs
index fea03d8..bc5d772 100644 (file)
@@ -27,8 +27,8 @@ add_library(gtkutil
 target_include_directories(gtkutil PRIVATE uilib)
 target_link_libraries(gtkutil PRIVATE uilib)
 
-target_include_directories(gtkutil PRIVATE ${GTK2_PANGO_INCLUDE_DIR})
-target_link_libraries(gtkutil PRIVATE ${GTK2_PANGO_LIBRARY})
+target_include_directories(gtkutil PRIVATE ${${GTK_NS}_INCLUDE_DIRS})
+target_link_libraries(gtkutil PRIVATE ${${GTK_NS}_LIBRARIES})
 
 find_package(GtkGLExt REQUIRED)
 target_include_directories(gtkutil PRIVATE ${GTKGL_INCLUDE_DIRS})
index caf6c42..7f50d05 100644 (file)
@@ -51,7 +51,7 @@ void WinPrint( const char *str, ... ){
        vsprintf( text, str, argptr );
        va_end( argptr );
 
-       printf( text );
+       printf( "%s", text );
 }
 #else
 void WinPrint( const char *str, ... ){
index c664d9c..f10ee3a 100644 (file)
@@ -3,8 +3,8 @@ add_library(uilib
         )
 
 find_package(GTK2 REQUIRED)
-target_include_directories(uilib PUBLIC ${GTK2_INCLUDE_DIRS})
-target_link_libraries(uilib PUBLIC ${GTK2_LIBRARIES})
+target_include_directories(uilib PUBLIC ${${GTK_NS}_INCLUDE_DIRS})
+target_link_libraries(uilib PUBLIC ${${GTK_NS}_LIBRARIES})
 
 target_include_directories(uilib PUBLIC gtkutil)
 target_link_libraries(uilib PUBLIC gtkutil)
index a882ffe..958384c 100644 (file)
@@ -99,6 +99,7 @@ target_link_libraries(radiant
     ${CMAKE_DL_LIBS}
     ${LIBXML2_LIBRARIES}
     ${OPENGL_gl_LIBRARY}
+    ${${GTK_NS}_LIBRARIES}
     ${GTKGL_LIBRARIES}
     includes
     cmdlib
index c669aba..196297e 100644 (file)
@@ -208,11 +208,9 @@ void error_redirect( const gchar *domain, GLogLevelFlags log_level, const gchar
        // spam it...
        globalErrorStream() << buf << "\n";
 
-       // FIXME why are warnings is_fatal?
-#ifndef _DEBUG
-       if ( is_fatal )
-#endif
-       ERROR_MESSAGE( "GTK+ error: " << buf );
+       if (is_fatal) {
+           ERROR_MESSAGE( "GTK+ error: " << buf );
+    }
 }
 
 #if defined ( _DEBUG ) && defined ( WIN32 ) && defined ( _MSC_VER )