]> git.rm.cloudns.org Git - xonotic/netradiant.git/commitdiff
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 dda42c76e15f5f3a1c6bd4a8b2d7bdb43495c161..78efba947a1ca4b171924105d550179342932979 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 fea03d80cbd639975f5ed4e92dbf4e01df0dee33..bc5d772cbf9ec7629038d1cfbb9d9622558db363 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 caf6c4228d9aff64d892d2d21779ca61b1f2516c..7f50d054b94a1f0d10c8b6e14ea5881c011f6700 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 c664d9c01be686ce33d3dce99adff5796911c37f..f10ee3adde90391fe0f77ee075598aa4c3eb6c94 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 a882ffe27235e918bedccca1e44847f6aac7b82d..958384cca45818b4b847e0f1d1baa9f44757922c 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 c669aba41f4d5367024720aa6ed6a2d2c9f04b11..196297ede2ad6e226e14ade58e077afc2585bc31 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 )