Skip to content

Commit ab109cd

Browse files
committed
Use ON and OFF for CMake booleans
CMake supports a number of strings for truthy and falsey values. ON/OFF and TRUE/FALSE are the most popular but 1/0 is also supported. This is mostly a style choice but I'm inclined to believe that ON/OFF is the most popular option and I'm generally in favor of style choices that better align with the community at large.
1 parent 157d4d9 commit ab109cd

12 files changed

Lines changed: 73 additions & 73 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
platform:
31-
- { name: Windows VS2019 x86, os: windows-2019, flags: -DSFML_USE_MESA3D=TRUE -GNinja }
32-
- { name: Windows VS2019 x64, os: windows-2019, flags: -DSFML_USE_MESA3D=TRUE -GNinja }
33-
- { name: Windows VS2022 x86, os: windows-2022, flags: -DSFML_USE_MESA3D=TRUE -GNinja }
34-
- { name: Windows VS2022 x64, os: windows-2022, flags: -DSFML_USE_MESA3D=TRUE -GNinja }
35-
- { name: Windows VS2022 ClangCL MSBuild, os: windows-2022, flags: -DSFML_USE_MESA3D=TRUE -T ClangCL } # ninja doesn't support specifying the toolset, so use the ClangCL toolset to test building with MSBuild as well
36-
- { name: Windows VS2022 OpenGL ES, os: windows-2022, flags: -DSFML_USE_MESA3D=TRUE -DSFML_OPENGL_ES=ON -GNinja }
37-
- { name: Windows VS2022 Unity, os: windows-2022, flags: -DSFML_USE_MESA3D=TRUE -DCMAKE_UNITY_BUILD=ON -GNinja }
38-
- { name: Windows LLVM/Clang, os: windows-2022, flags: -DSFML_USE_MESA3D=TRUE -DCMAKE_CXX_COMPILER=clang++ -GNinja }
39-
- { name: Windows MinGW, os: windows-2022, flags: -DSFML_USE_MESA3D=TRUE -DCMAKE_CXX_COMPILER=g++ -GNinja }
31+
- { name: Windows VS2019 x86, os: windows-2019, flags: -DSFML_USE_MESA3D=ON -GNinja }
32+
- { name: Windows VS2019 x64, os: windows-2019, flags: -DSFML_USE_MESA3D=ON -GNinja }
33+
- { name: Windows VS2022 x86, os: windows-2022, flags: -DSFML_USE_MESA3D=ON -GNinja }
34+
- { name: Windows VS2022 x64, os: windows-2022, flags: -DSFML_USE_MESA3D=ON -GNinja }
35+
- { name: Windows VS2022 ClangCL MSBuild, os: windows-2022, flags: -DSFML_USE_MESA3D=ON -T ClangCL } # ninja doesn't support specifying the toolset, so use the ClangCL toolset to test building with MSBuild as well
36+
- { name: Windows VS2022 OpenGL ES, os: windows-2022, flags: -DSFML_USE_MESA3D=ON -DSFML_OPENGL_ES=ON -GNinja }
37+
- { name: Windows VS2022 Unity, os: windows-2022, flags: -DSFML_USE_MESA3D=ON -DCMAKE_UNITY_BUILD=ON -GNinja }
38+
- { name: Windows LLVM/Clang, os: windows-2022, flags: -DSFML_USE_MESA3D=ON -DCMAKE_CXX_COMPILER=clang++ -GNinja }
39+
- { name: Windows MinGW, os: windows-2022, flags: -DSFML_USE_MESA3D=ON -DCMAKE_CXX_COMPILER=g++ -GNinja }
4040
- { name: Linux GCC, os: ubuntu-22.04, flags: -GNinja }
4141
- { name: Linux Clang, os: ubuntu-22.04, flags: -DCMAKE_CXX_COMPILER=clang++ -GNinja , gcovr_options: '--gcov-executable="llvm-cov-$CLANG_VERSION gcov"' }
4242
- { name: Linux GCC DRM, os: ubuntu-22.04, flags: -DSFML_USE_DRM=ON -DSFML_RUN_DISPLAY_TESTS=OFF -GNinja }
@@ -47,31 +47,31 @@ jobs:
4747
- { name: iOS, os: macos-12, flags: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 }
4848
- { name: iOS Xcode, os: macos-12, flags: -DCMAKE_SYSTEM_NAME=iOS -GXcode -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO }
4949
config:
50-
- { name: Shared, flags: -DBUILD_SHARED_LIBS=TRUE }
51-
- { name: Static, flags: -DBUILD_SHARED_LIBS=FALSE }
50+
- { name: Shared, flags: -DBUILD_SHARED_LIBS=ON }
51+
- { name: Static, flags: -DBUILD_SHARED_LIBS=OFF }
5252
type:
5353
- { name: Release }
54-
- { name: Debug, flags: -DCMAKE_BUILD_TYPE=Debug -DSFML_ENABLE_COVERAGE=TRUE }
54+
- { name: Debug, flags: -DCMAKE_BUILD_TYPE=Debug -DSFML_ENABLE_COVERAGE=ON }
5555

5656
include:
5757
- platform: { name: Windows VS2022 x64, os: windows-2022 }
58-
config: { name: Static with PCH (MSVC), flags: -DSFML_USE_MESA3D=TRUE -GNinja -DBUILD_SHARED_LIBS=FALSE -DSFML_ENABLE_PCH=1 }
58+
config: { name: Static with PCH (MSVC), flags: -DSFML_USE_MESA3D=ON -GNinja -DBUILD_SHARED_LIBS=OFF -DSFML_ENABLE_PCH=ON }
5959
- platform: { name: Linux GCC, os: ubuntu-22.04 }
60-
config: { name: Static with PCH (GCC), flags: -GNinja -DCMAKE_CXX_COMPILER=g++ -DBUILD_SHARED_LIBS=FALSE -DSFML_ENABLE_PCH=1 }
60+
config: { name: Static with PCH (GCC), flags: -GNinja -DCMAKE_CXX_COMPILER=g++ -DBUILD_SHARED_LIBS=OFF -DSFML_ENABLE_PCH=ON }
6161
- platform: { name: Linux Clang, os: ubuntu-22.04 }
62-
config: { name: Static with PCH (Clang), flags: -GNinja -DCMAKE_CXX_COMPILER=clang++ -DBUILD_SHARED_LIBS=FALSE -DSFML_ENABLE_PCH=1 }
62+
config: { name: Static with PCH (Clang), flags: -GNinja -DCMAKE_CXX_COMPILER=clang++ -DBUILD_SHARED_LIBS=OFF -DSFML_ENABLE_PCH=ON }
6363
- platform: { name: Windows MinGW, os: windows-2022 }
64-
config: { name: Static Standard Libraries, flags: -GNinja -DSFML_USE_MESA3D=TRUE -DCMAKE_CXX_COMPILER=g++ -DSFML_USE_STATIC_STD_LIBS=TRUE }
64+
config: { name: Static Standard Libraries, flags: -GNinja -DSFML_USE_MESA3D=ON -DCMAKE_CXX_COMPILER=g++ -DSFML_USE_STATIC_STD_LIBS=ON }
6565
- platform: { name: Windows MinGW, os: windows-2022 }
66-
config: { name: Static with PCH (GCC), flags: -GNinja -DSFML_USE_MESA3D=TRUE -DCMAKE_CXX_COMPILER=g++ -DBUILD_SHARED_LIBS=FALSE -DSFML_ENABLE_PCH=1 -DSFML_ENABLE_STDLIB_ASSERTIONS=FALSE } # disabling stdlib assertions due to false positive
66+
config: { name: Static with PCH (GCC), flags: -GNinja -DSFML_USE_MESA3D=ON -DCMAKE_CXX_COMPILER=g++ -DBUILD_SHARED_LIBS=OFF -DSFML_ENABLE_PCH=ON -DSFML_ENABLE_STDLIB_ASSERTIONS=OFF } # disabling stdlib assertions due to false positive
6767
- platform: { name: macOS, os: macos-12 }
68-
config: { name: Frameworks, flags: -GNinja -DSFML_BUILD_FRAMEWORKS=TRUE -DBUILD_SHARED_LIBS=TRUE }
68+
config: { name: Frameworks, flags: -GNinja -DSFML_BUILD_FRAMEWORKS=ON -DBUILD_SHARED_LIBS=ON }
6969
- platform: { name: macOS , os: macos-12 }
70-
config: { name: System Deps, flags: -GNinja -DBUILD_SHARED_LIBS=TRUE -DSFML_USE_SYSTEM_DEPS=TRUE }
70+
config: { name: System Deps, flags: -GNinja -DBUILD_SHARED_LIBS=ON -DSFML_USE_SYSTEM_DEPS=ON }
7171
- platform: { name: Android, os: ubuntu-22.04 }
7272
config:
7373
name: x86 (API 21)
74-
flags: -GNinja -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=21 -DCMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT -DBUILD_SHARED_LIBS=TRUE -DCMAKE_ANDROID_STL_TYPE=c++_shared -DSFML_RUN_DISPLAY_TESTS=OFF -DSFML_RUN_AUDIO_DEVICE_TESTS=OFF
74+
flags: -GNinja -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=21 -DCMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT -DBUILD_SHARED_LIBS=ON -DCMAKE_ANDROID_STL_TYPE=c++_shared -DSFML_RUN_DISPLAY_TESTS=OFF -DSFML_RUN_AUDIO_DEVICE_TESTS=OFF
7575
arch: x86
7676
api: 21
7777
libcxx: i686-linux-android/libc++_shared.so
@@ -81,7 +81,7 @@ jobs:
8181
- platform: { name: Android, os: ubuntu-22.04 }
8282
config:
8383
name: x86_64 (API 24)
84-
flags: -GNinja -DCMAKE_ANDROID_ARCH_ABI=x86_64 -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=24 -DCMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT -DBUILD_SHARED_LIBS=TRUE -DCMAKE_ANDROID_STL_TYPE=c++_shared -DSFML_RUN_DISPLAY_TESTS=OFF -DSFML_RUN_AUDIO_DEVICE_TESTS=OFF
84+
flags: -GNinja -DCMAKE_ANDROID_ARCH_ABI=x86_64 -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=24 -DCMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT -DBUILD_SHARED_LIBS=ON -DCMAKE_ANDROID_STL_TYPE=c++_shared -DSFML_RUN_DISPLAY_TESTS=OFF -DSFML_RUN_AUDIO_DEVICE_TESTS=OFF
8585
arch: x86_64
8686
api: 24
8787
libcxx: x86_64-linux-android/libc++_shared.so
@@ -91,15 +91,15 @@ jobs:
9191
- platform: { name: Android, os: ubuntu-22.04 }
9292
config:
9393
name: armeabi-v7a (API 29)
94-
flags: -GNinja -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=29 -DCMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT -DBUILD_SHARED_LIBS=TRUE -DCMAKE_ANDROID_STL_TYPE=c++_shared
94+
flags: -GNinja -DCMAKE_ANDROID_ARCH_ABI=armeabi-v7a -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=29 -DCMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT -DBUILD_SHARED_LIBS=ON -DCMAKE_ANDROID_STL_TYPE=c++_shared
9595
arch: armeabi-v7a
9696
api: 29
9797
# There are no emulators available for armeabi-v7a so we skip running the tests (we still build them) by not specifying emuapi
9898
type: { name: Debug, flags: -DCMAKE_BUILD_TYPE=Debug }
9999
- platform: { name: Android, os: ubuntu-22.04 }
100100
config:
101101
name: arm64-v8a (API 33)
102-
flags: -GNinja -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=33 -DCMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT -DBUILD_SHARED_LIBS=TRUE -DCMAKE_ANDROID_STL_TYPE=c++_shared -DSFML_RUN_DISPLAY_TESTS=OFF -DSFML_RUN_AUDIO_DEVICE_TESTS=OFF
102+
flags: -GNinja -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=33 -DCMAKE_ANDROID_NDK=$ANDROID_NDK_ROOT -DBUILD_SHARED_LIBS=ON -DCMAKE_ANDROID_STL_TYPE=c++_shared -DSFML_RUN_DISPLAY_TESTS=OFF -DSFML_RUN_AUDIO_DEVICE_TESTS=OFF
103103
arch: arm64-v8a
104104
api: 33
105105
libcxx: aarch64-linux-android/libc++_shared.so
@@ -345,7 +345,7 @@ jobs:
345345
platform:
346346
- { name: Windows, os: windows-2022, flags: -GNinja }
347347
- { name: Linux, os: ubuntu-24.04 }
348-
- { name: Linux DRM, os: ubuntu-24.04, flags: -DSFML_USE_DRM=TRUE }
348+
- { name: Linux DRM, os: ubuntu-24.04, flags: -DSFML_USE_DRM=ON }
349349
- { name: Linux OpenGL ES, os: ubuntu-24.04, flags: -DSFML_OPENGL_ES=ON }
350350
- { name: macOS, os: macos-12 }
351351
- { name: iOS, os: macos-12, flags: -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 }

CMakeLists.txt

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -43,37 +43,37 @@ include(GNUInstallDirs)
4343

4444
# disable static libraries on Android
4545
if(SFML_OS_ANDROID)
46-
set(BUILD_SHARED_LIBS TRUE)
46+
set(BUILD_SHARED_LIBS ON)
4747
endif()
4848

4949
# add options to select which modules to build
50-
sfml_set_option(SFML_BUILD_WINDOW TRUE BOOL "TRUE to build SFML's Window module. This setting is ignored, if the graphics module is built.")
51-
sfml_set_option(SFML_BUILD_GRAPHICS TRUE BOOL "TRUE to build SFML's Graphics module.")
52-
sfml_set_option(SFML_BUILD_AUDIO TRUE BOOL "TRUE to build SFML's Audio module.")
53-
sfml_set_option(SFML_BUILD_NETWORK TRUE BOOL "TRUE to build SFML's Network module.")
50+
sfml_set_option(SFML_BUILD_WINDOW ON BOOL "ON to build SFML's Window module. This setting is ignored, if the graphics module is built.")
51+
sfml_set_option(SFML_BUILD_GRAPHICS ON BOOL "ON to build SFML's Graphics module.")
52+
sfml_set_option(SFML_BUILD_AUDIO ON BOOL "ON to build SFML's Audio module.")
53+
sfml_set_option(SFML_BUILD_NETWORK ON BOOL "ON to build SFML's Network module.")
5454

5555
if(SFML_BUILD_WINDOW)
5656
# add an option for choosing the OpenGL implementation
57-
sfml_set_option(SFML_OPENGL_ES ${OPENGL_ES} BOOL "TRUE to use an OpenGL ES implementation, FALSE to use a desktop OpenGL implementation")
57+
sfml_set_option(SFML_OPENGL_ES ${OPENGL_ES} BOOL "ON to use an OpenGL ES implementation, OFF to use a desktop OpenGL implementation")
5858

5959
# add an option for choosing whether to use the DRM windowing backend
6060
if(SFML_OS_LINUX)
61-
sfml_set_option(SFML_USE_DRM FALSE BOOL "TRUE to use DRM windowing backend")
61+
sfml_set_option(SFML_USE_DRM OFF BOOL "ON to use DRM windowing backend")
6262
endif()
6363
endif()
6464

6565
# macOS specific options
6666
if(SFML_OS_MACOS OR SFML_OS_IOS)
6767
# add an option to build frameworks instead of dylibs (release only)
68-
sfml_set_option(SFML_BUILD_FRAMEWORKS FALSE BOOL "TRUE to build SFML as frameworks libraries (release only), FALSE to build according to BUILD_SHARED_LIBS")
68+
sfml_set_option(SFML_BUILD_FRAMEWORKS OFF BOOL "ON to build SFML as frameworks libraries (release only), OFF to build according to BUILD_SHARED_LIBS")
6969

7070
# add an option to automatically install Xcode templates
71-
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.")
71+
sfml_set_option(SFML_INSTALL_XCODE_TEMPLATES OFF BOOL "ON to automatically install the Xcode templates, OFF to do nothing about it. The templates are compatible with Xcode 4 and 5.")
7272
endif()
7373

7474
# Android options
7575
if(SFML_OS_ANDROID)
76-
sfml_set_option(SFML_ANDROID_USE_SUSPEND_AWARE_CLOCK FALSE BOOL "TRUE to use an sf::Clock implementation which takes system sleep time into account (keeps advancing during suspension), FALSE to default to another available monotonic clock")
76+
sfml_set_option(SFML_ANDROID_USE_SUSPEND_AWARE_CLOCK OFF BOOL "ON to use an sf::Clock implementation which takes system sleep time into account (keeps advancing during suspension), OFF to default to another available monotonic clock")
7777
if(SFML_ANDROID_USE_SUSPEND_AWARE_CLOCK)
7878
add_definitions(-DSFML_ANDROID_USE_SUSPEND_AWARE_CLOCK)
7979
endif()
@@ -103,13 +103,13 @@ endif()
103103
# force building sfml-window, if sfml-graphics module is built
104104
if(SFML_BUILD_GRAPHICS AND NOT SFML_BUILD_WINDOW)
105105
message(WARNING "You're trying to build SFML's Graphics module without the Window module. Forcing building of the Window module as a dependency.")
106-
set(SFML_BUILD_WINDOW TRUE)
106+
set(SFML_BUILD_WINDOW ON)
107107
endif()
108108

109109
# allow not using bundled dependencies with a switch
110110
# (except for stb_image)
111111
# yes this is horrible, but GLOB_RECURSE sucks
112-
sfml_set_option(SFML_USE_SYSTEM_DEPS FALSE BOOL "TRUE to use system dependencies, FALSE to use the bundled ones.")
112+
sfml_set_option(SFML_USE_SYSTEM_DEPS OFF BOOL "ON to use system dependencies, OFF to use the bundled ones.")
113113
if(SFML_USE_SYSTEM_DEPS)
114114
if(SFML_INSTALL_XCODE_TEMPLATES)
115115
message(FATAL_ERROR "XCode templates installation cannot be used with the SFML_USE_SYSTEM_DEPS option (the bundled frameworks are required.)")
@@ -141,7 +141,7 @@ endif()
141141

142142
if(SFML_COMPILER_MSVC)
143143
# add an option to choose whether PDB debug symbols should be generated (defaults to true when possible)
144-
sfml_set_option(SFML_GENERATE_PDB TRUE BOOL "True to generate PDB debug symbols, FALSE otherwise.")
144+
sfml_set_option(SFML_GENERATE_PDB ON BOOL "True to generate PDB debug symbols, OFF otherwise.")
145145

146146
# if building using a compiler launcher, embed the MSVC debugging information to allow for caching
147147
if(CMAKE_CXX_COMPILER_LAUNCHER)
@@ -157,14 +157,14 @@ endif()
157157

158158
# define an option for choosing between static and dynamic C runtime (Windows only)
159159
if(SFML_OS_WINDOWS)
160-
sfml_set_option(SFML_USE_STATIC_STD_LIBS FALSE BOOL "TRUE to statically link to the standard libraries, FALSE to use them as DLLs")
160+
sfml_set_option(SFML_USE_STATIC_STD_LIBS OFF BOOL "ON to statically link to the standard libraries, OFF to use them as DLLs")
161161

162162
# the following combination of flags is not valid
163163
if(BUILD_SHARED_LIBS AND SFML_USE_STATIC_STD_LIBS)
164164
message(FATAL_ERROR "BUILD_SHARED_LIBS and SFML_USE_STATIC_STD_LIBS cannot be used together")
165165
endif()
166166

167-
sfml_set_option(SFML_USE_MESA3D FALSE BOOL "TRUE to use the Mesa 3D graphics library for rendering, FALSE to use the system provided library for rendering")
167+
sfml_set_option(SFML_USE_MESA3D OFF BOOL "ON to use the Mesa 3D graphics library for rendering, OFF to use the system provided library for rendering")
168168

169169
include(cmake/Mesa3D.cmake)
170170
endif()
@@ -178,13 +178,13 @@ if(SFML_OS_MACOS)
178178
if(SFML_BUILD_FRAMEWORKS)
179179
# requirement #1
180180
if(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
181-
message(FATAL_ERROR "CMAKE_BUILD_TYPE should be \"Release\" when SFML_BUILD_FRAMEWORKS is TRUE")
181+
message(FATAL_ERROR "CMAKE_BUILD_TYPE should be \"Release\" when SFML_BUILD_FRAMEWORKS is ON")
182182
return()
183183
endif()
184184

185185
# requirement #2
186186
if(NOT BUILD_SHARED_LIBS)
187-
message(FATAL_ERROR "BUILD_SHARED_LIBS should be TRUE when SFML_BUILD_FRAMEWORKS is TRUE")
187+
message(FATAL_ERROR "BUILD_SHARED_LIBS should be ON when SFML_BUILD_FRAMEWORKS is ON")
188188
return()
189189
endif()
190190
endif()
@@ -220,13 +220,13 @@ set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMake")
220220
add_subdirectory(src/SFML)
221221

222222
# on Linux and BSD-like OS, install pkg-config files by default
223-
set(SFML_INSTALL_PKGCONFIG_DEFAULT FALSE)
223+
set(SFML_INSTALL_PKGCONFIG_DEFAULT OFF)
224224

225225
if(SFML_OS_LINUX OR SFML_OS_FREEBSD OR SFML_OS_OPENBSD OR SFML_OS_NETBSD)
226-
set(SFML_INSTALL_PKGCONFIG_DEFAULT TRUE)
226+
set(SFML_INSTALL_PKGCONFIG_DEFAULT ON)
227227
endif()
228228

229-
sfml_set_option(SFML_INSTALL_PKGCONFIG_FILES ${SFML_INSTALL_PKGCONFIG_DEFAULT} BOOL "TRUE to automatically install pkg-config files so other projects can find SFML")
229+
sfml_set_option(SFML_INSTALL_PKGCONFIG_FILES ${SFML_INSTALL_PKGCONFIG_DEFAULT} BOOL "ON to automatically install pkg-config files so other projects can find SFML")
230230

231231
if(SFML_INSTALL_PKGCONFIG_FILES)
232232
# account for CMAKE_INSTALL_LIBDIR potentially being an absolute path
@@ -253,7 +253,7 @@ if(SFML_INSTALL_PKGCONFIG_FILES)
253253
endif()
254254

255255
# option to enable precompiled headers
256-
sfml_set_option(SFML_ENABLE_PCH FALSE BOOL "TRUE to enable precompiled headers for SFML builds -- only supported on Windows/Linux and for static library builds")
256+
sfml_set_option(SFML_ENABLE_PCH OFF BOOL "ON to enable precompiled headers for SFML builds -- only supported on Windows/Linux and for static library builds")
257257

258258
if(SFML_ENABLE_PCH AND BUILD_SHARED_LIBS)
259259
message(FATAL_ERROR "Precompiled headers are currently not supported for shared library builds")
@@ -310,7 +310,7 @@ else()
310310

311311
# edit target properties
312312
set_target_properties(SFML PROPERTIES
313-
FRAMEWORK TRUE
313+
FRAMEWORK ON
314314
FRAMEWORK_VERSION ${PROJECT_VERSION}
315315
MACOSX_FRAMEWORK_IDENTIFIER org.sfml-dev.SFML
316316
MACOSX_FRAMEWORK_SHORT_VERSION_STRING ${PROJECT_VERSION}
@@ -368,7 +368,7 @@ else()
368368
# NOTE: it's not required to link against SFML.framework
369369
set_target_properties(SFML PROPERTIES INSTALL_NAME_DIR "@rpath")
370370
if(NOT CMAKE_SKIP_BUILD_RPATH)
371-
set_target_properties(SFML PROPERTIES BUILD_WITH_INSTALL_NAME_DIR TRUE)
371+
set_target_properties(SFML PROPERTIES BUILD_WITH_INSTALL_NAME_DIR ON)
372372
endif()
373373

374374
# install rule
@@ -476,7 +476,7 @@ endif()
476476
sfml_export_targets()
477477

478478
# configure extras by default when building SFML directly, otherwise hide them
479-
sfml_set_option(SFML_CONFIGURE_EXTRAS ${PROJECT_IS_TOP_LEVEL} BOOL "TRUE to configure extras, FALSE to ignore them")
479+
sfml_set_option(SFML_CONFIGURE_EXTRAS ${PROJECT_IS_TOP_LEVEL} BOOL "ON to configure extras, OFF to ignore them")
480480

481481
if(NOT SFML_CONFIGURE_EXTRAS)
482482
return()
@@ -503,22 +503,22 @@ set(CPACK_NSIS_INSTALLER_MUI_ICON_CODE "!define MUI_WELCOMEFINISHPAGE_BITMAP \\\
503503
include(CPack)
504504

505505
# add an option for building the API documentation
506-
sfml_set_option(SFML_BUILD_DOC FALSE BOOL "TRUE to generate the API documentation, FALSE to ignore it")
506+
sfml_set_option(SFML_BUILD_DOC OFF BOOL "ON to generate the API documentation, OFF to ignore it")
507507
if(SFML_BUILD_DOC)
508508
add_subdirectory(doc)
509509
endif()
510510

511511
# add an option for building the examples
512-
sfml_set_option(SFML_BUILD_EXAMPLES FALSE BOOL "TRUE to build the SFML examples, FALSE to ignore them")
512+
sfml_set_option(SFML_BUILD_EXAMPLES OFF BOOL "ON to build the SFML examples, OFF to ignore them")
513513
if(SFML_BUILD_EXAMPLES AND NOT SFML_OS_ANDROID)
514514
add_subdirectory(examples)
515515
endif()
516516

517517
# add an option for building the test suite
518-
sfml_set_option(SFML_BUILD_TEST_SUITE FALSE BOOL "TRUE to build the SFML test suite, FALSE to ignore it")
518+
sfml_set_option(SFML_BUILD_TEST_SUITE OFF BOOL "ON to build the SFML test suite, OFF to ignore it")
519519

520520
# add an option for enabling coverage reporting
521-
sfml_set_option(SFML_ENABLE_COVERAGE FALSE BOOL "TRUE to enable coverage reporting, FALSE to ignore it")
521+
sfml_set_option(SFML_ENABLE_COVERAGE OFF BOOL "ON to enable coverage reporting, OFF to ignore it")
522522

523523
if(SFML_BUILD_TEST_SUITE)
524524
if(SFML_BUILD_WINDOW AND SFML_BUILD_GRAPHICS AND SFML_BUILD_NETWORK AND SFML_BUILD_AUDIO)

0 commit comments

Comments
 (0)