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
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})
vsprintf( text, str, argptr );
va_end( argptr );
- printf( text );
+ printf( "%s", text );
}
#else
void WinPrint( const char *str, ... ){
)
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)
${CMAKE_DL_LIBS}
${LIBXML2_LIBRARIES}
${OPENGL_gl_LIBRARY}
+ ${${GTK_NS}_LIBRARIES}
${GTKGL_LIBRARIES}
includes
cmdlib
// 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 )