From e6de6fed3c1543b25911ab3769800d38f4618241 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 12 Jun 2011 19:17:21 +0000 Subject: [PATCH] - Revert r3214, which added some completely useless warnings for GCC. I'm sure there are good reasons even GCC doesn't enable them by default when you use -Wall. SVN r3225 (trunk) --- bzip2/CMakeLists.txt | 2 +- dumb/CMakeLists.txt | 2 +- game-music-emu/CMakeLists.txt | 2 +- gdtoa/CMakeLists.txt | 2 +- jpeg-6b/CMakeLists.txt | 2 +- lzma/CMakeLists.txt | 2 +- src/CMakeLists.txt | 15 ++++++++++++++- zlib/CMakeLists.txt | 2 +- 8 files changed, 21 insertions(+), 8 deletions(-) diff --git a/bzip2/CMakeLists.txt b/bzip2/CMakeLists.txt index f96c97a8f..5c1255604 100644 --- a/bzip2/CMakeLists.txt +++ b/bzip2/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required( VERSION 2.4 ) if( CMAKE_COMPILER_IS_GNUC ) - set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer -Wshadow -Wfloat-equal -Wcast-qual" ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" ) endif( CMAKE_COMPILER_IS_GNUC ) add_definitions( -DBZ_NO_STDIO ) diff --git a/dumb/CMakeLists.txt b/dumb/CMakeLists.txt index 82504e2fa..c2cbe8d1b 100644 --- a/dumb/CMakeLists.txt +++ b/dumb/CMakeLists.txt @@ -12,7 +12,7 @@ endif( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG -DDEBUGMODE=1" ) if( CMAKE_COMPILER_IS_GNUC ) - set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-pointer-sign -Wno-uninitialized -Wshadow -Wfloat-equal -Wcast-qual" ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-pointer-sign -Wno-uninitialized" ) endif( CMAKE_COMPILER_IS_GNUC ) CHECK_FUNCTION_EXISTS( itoa ITOA_EXISTS ) diff --git a/game-music-emu/CMakeLists.txt b/game-music-emu/CMakeLists.txt index 1f171c490..7905f847a 100644 --- a/game-music-emu/CMakeLists.txt +++ b/game-music-emu/CMakeLists.txt @@ -7,7 +7,7 @@ if( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) endif( NOT CMAKE_BUILD_TYPE MATCHES "Release" ) if( CMAKE_COMPILER_IS_GNUCXX ) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wshadow -Wfloat-equal -Wcast-qual" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" ) if( NOT PROFILE ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fomit-frame-pointer" ) endif( NOT PROFILE ) diff --git a/gdtoa/CMakeLists.txt b/gdtoa/CMakeLists.txt index bfb60fd10..6fc394d8d 100644 --- a/gdtoa/CMakeLists.txt +++ b/gdtoa/CMakeLists.txt @@ -9,7 +9,7 @@ if( MSVC ) endif( MSVC ) if( CMAKE_COMPILER_IS_GNUCXX ) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wshadow -Wfloat-equal -Wcast-qual" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra" ) endif( CMAKE_COMPILER_IS_GNUCXX ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ) diff --git a/jpeg-6b/CMakeLists.txt b/jpeg-6b/CMakeLists.txt index 557d70731..c3a5f458c 100644 --- a/jpeg-6b/CMakeLists.txt +++ b/jpeg-6b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required( VERSION 2.4 ) if( CMAKE_COMPILER_IS_GNUC ) - set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wfloat-equal -Wcast-qual -fomit-frame-pointer" ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" ) endif( CMAKE_COMPILER_IS_GNUC ) add_library( jpeg diff --git a/lzma/CMakeLists.txt b/lzma/CMakeLists.txt index 49bec8733..6a2561c68 100644 --- a/lzma/CMakeLists.txt +++ b/lzma/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required( VERSION 2.4 ) if( CMAKE_COMPILER_IS_GNUC ) - set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wshadow -Wfloat-equal -Wcast-qual -fomit-frame-pointer" ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -fomit-frame-pointer" ) endif( CMAKE_COMPILER_IS_GNUC ) set( LZMA_FILES diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6064e202f..4072e56fd 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -166,6 +166,19 @@ else( WIN32 ) set( NO_GTK ON ) endif( GTK2_FOUND ) endif( NOT NO_GTK ) + + # Check for Xcursor library and header files + find_library( XCURSOR_LIB Xcursor ) + if( XCURSOR_LIB ) + find_file( XCURSOR_HEADER "X11/Xcursor/Xcursor.h" ) + if( XCURSOR_HEADER ) + add_definitions( -DUSE_XCURSOR=1 ) + message( STATUS "Found Xcursor at ${XCURSOR_LIB}" ) + set( ZDOOM_LIBS ${ZDOOM_LIBS} ${XCURSOR_LIB} ) + else( XCURSOR_HEADER ) + unset( XCURSOR_LIB ) + endif( XCURSOR_HEADER ) + endif( XCURSOR_LIB ) endif( APPLE ) set( NASM_NAMES nasm ) @@ -394,7 +407,7 @@ if( CMAKE_COMPILER_IS_GNUCXX ) set( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${REL_CXX_FLAGS}" ) set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${REL_CXX_FLAGS}" ) - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused -Wextra -Wno-missing-field-initializers -Wshadow -Wfloat-equal -Wcast-qual" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused -Wextra -Wno-missing-field-initializers" ) # Remove extra warnings when using the official DirectX headers. # Also, TDM-GCC 4.4.0 no longer accepts glibc-style printf formats as valid, diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt index a4c04b286..619d735f0 100644 --- a/zlib/CMakeLists.txt +++ b/zlib/CMakeLists.txt @@ -82,7 +82,7 @@ endif() #============================================================================ set(ZLIB_PUBLIC_HDRS - ${CMAKE_CURRENT_BINARY_DIR}/zconf.h + zconf.h zlib.h ) set(ZLIB_PRIVATE_HDRS