mirror of
https://github.com/SFML/SFML.git
synced 2024-11-24 20:31:05 +08:00
Enable and fix CMake warnings
This commit is contained in:
parent
4315c3d290
commit
75b1e0ca71
@ -69,6 +69,12 @@ if(SFML_OS_MACOS OR SFML_OS_IOS)
|
||||
|
||||
# add an option to automatically install Xcode templates
|
||||
sfml_set_option(SFML_INSTALL_XCODE_TEMPLATES FALSE BOOL "TRUE to automatically install the Xcode templates, FALSE to do nothing about it. The templates are compatible with Xcode 4 and 5.")
|
||||
|
||||
# add option to set iOS deployment target
|
||||
sfml_set_option(SFML_IOS_DEPLOYMENT_TARGET "" STRING "iOS deployment target")
|
||||
|
||||
# add option to set code sign identity
|
||||
sfml_set_option(SFML_CODE_SIGN_IDENTITY "" STRING "iOS code sign identity")
|
||||
endif()
|
||||
|
||||
# Android options
|
||||
@ -301,6 +307,7 @@ else()
|
||||
sfml_set_stdlib(SFML)
|
||||
|
||||
# edit target properties
|
||||
set(MACOSX_FRAMEWORK_ICON_FILE "")
|
||||
set_target_properties(SFML PROPERTIES
|
||||
FRAMEWORK TRUE
|
||||
FRAMEWORK_VERSION ${PROJECT_VERSION}
|
||||
|
@ -11,6 +11,15 @@
|
||||
"SFML_BUILD_EXAMPLES": "ON",
|
||||
"SFML_BUILD_TEST_SUITE": "ON",
|
||||
"SFML_WARNINGS_AS_ERRORS": "ON"
|
||||
},
|
||||
"warnings": {
|
||||
"dev": true,
|
||||
"deprecated": true,
|
||||
"uninitialized": true
|
||||
},
|
||||
"errors": {
|
||||
"dev": true,
|
||||
"deprecated": true
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -1,3 +1,5 @@
|
||||
set(SFML_OS_ANDROID "")
|
||||
|
||||
# detect the OS
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
set(SFML_OS_WINDOWS 1)
|
||||
@ -6,6 +8,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
set(OPENGL_ES 0)
|
||||
|
||||
# detect the architecture
|
||||
set(ARCH_64BITS "")
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set(ARCH_32BITS 1)
|
||||
elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
|
@ -190,6 +190,7 @@ macro(sfml_add_library module)
|
||||
if((SFML_OS_MACOS OR SFML_OS_IOS) AND BUILD_SHARED_LIBS AND NOT THIS_STATIC)
|
||||
if(SFML_BUILD_FRAMEWORKS)
|
||||
# adapt target to build frameworks instead of dylibs
|
||||
set(MACOSX_FRAMEWORK_ICON_FILE "")
|
||||
set_target_properties(${target} PROPERTIES
|
||||
FRAMEWORK TRUE
|
||||
FRAMEWORK_VERSION ${PROJECT_VERSION}
|
||||
|
@ -14,14 +14,11 @@ find_path(
|
||||
libudev.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
${UDEV_PATH_INCLUDES}
|
||||
)
|
||||
|
||||
find_library(
|
||||
UDEV_LIBRARIES
|
||||
NAMES udev libudev
|
||||
PATHS ${ADDITIONAL_LIBRARY_PATHS}
|
||||
${UDEV_PATH_LIB}
|
||||
)
|
||||
|
||||
if(UDEV_LIBRARIES AND UDEV_INCLUDE_DIR)
|
||||
@ -41,10 +38,6 @@ if(UDEV_FOUND)
|
||||
message(STATUS " include: ${UDEV_INCLUDE_DIR}")
|
||||
else()
|
||||
message(STATUS "UDev not found.")
|
||||
message(STATUS "UDev: You can specify includes: -DUDEV_PATH_INCLUDES=/opt/udev/include")
|
||||
message(STATUS " currently found includes: ${UDEV_INCLUDE_DIR}")
|
||||
message(STATUS "UDev: You can specify libs: -DUDEV_PATH_LIB=/opt/udev/lib")
|
||||
message(STATUS " currently found libs: ${UDEV_LIBRARIES}")
|
||||
if(UDev_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find UDev library")
|
||||
endif()
|
||||
|
@ -1,6 +1,7 @@
|
||||
# all source files
|
||||
set(SRC OpenGL.cpp)
|
||||
|
||||
set(RESOURCES "")
|
||||
if(SFML_OS_IOS)
|
||||
set(RESOURCES
|
||||
resources/background.jpg
|
||||
|
@ -1,5 +1,7 @@
|
||||
# all source files
|
||||
set(SRC Tennis.cpp)
|
||||
|
||||
set(RESOURCES "")
|
||||
if(SFML_OS_IOS)
|
||||
set(RESOURCES
|
||||
resources/ball.wav
|
||||
|
@ -174,6 +174,7 @@ if(SFML_ENABLE_COVERAGE AND SFML_OS_WINDOWS AND NOT SFML_COMPILER_GCC)
|
||||
)
|
||||
endif()
|
||||
|
||||
set(COVERAGE_PREFIX "")
|
||||
if(SFML_ENABLE_COVERAGE AND OpenCppCoverage_FOUND)
|
||||
# Use OpenCppCoverage
|
||||
message(STATUS "Using OpenCppCoverage to generate coverage report")
|
||||
|
Loading…
Reference in New Issue
Block a user