Skip to content

Commit d0b6e22

Browse files
committed
CMake: Remove IS(_NOT)_MINSIZE_BUILD
1 parent 36e0623 commit d0b6e22

File tree

2 files changed

+19
-30
lines changed

2 files changed

+19
-30
lines changed

cmake/macros/PackageConfig.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,6 @@ function(package_option name)
139139

140140
endif()
141141

142-
elseif(IS_MINSIZE_BUILD)
143-
set(default OFF)
144-
145142
else()
146143
set(default "${${found_as}_FOUND}")
147144

dtool/Config.cmake

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,6 @@ else()
5252
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${_configs})
5353
endif()
5454

55-
# Provide convenient boolean expression based on build type
56-
if(CMAKE_BUILD_TYPE MATCHES "MinSizeRel")
57-
set(IS_MINSIZE_BUILD True)
58-
set(IS_NOT_MINSIZE_BUILD False)
59-
else()
60-
set(IS_MINSIZE_BUILD False)
61-
set(IS_NOT_MINSIZE_BUILD True)
62-
endif()
63-
6455
set(PER_CONFIG_OPTIONS)
6556

6657
# Are we building with static or dynamic linking?
@@ -437,7 +428,9 @@ pointers.")
437428
#option(HAVE_TINYDISPLAY
438429
# "Builds TinyDisplay, a light software renderer based on TinyGL,
439430
#that is built into Panda. TinyDisplay is not as full-featured as Mesa
440-
#but is many times faster." ${IS_NOT_MINSIZE_BUILD})
431+
#but is many times faster." ON)
432+
#option(HAVE_TINYDISPLAY_MinSizeRel "" OFF)
433+
#list(APPEND PER_CONFIG_OPTIONS HAVE_TINYDISPLAY)
441434

442435

443436
# Is SDL installed, and where?
@@ -511,23 +504,22 @@ option(USE_PANDAFILESTREAM
511504
# These image formats don't require the assistance of a third-party
512505
# library to read and write, so there's normally no reason to disable
513506
# them int he build, unless you are looking to reduce the memory footprint.
514-
option(HAVE_SGI_RGB "Enable support for loading SGI RGB images."
515-
${IS_NOT_MINSIZE_BUILD})
516-
option(HAVE_TGA "Enable support for loading TGA images."
517-
${IS_NOT_MINSIZE_BUILD})
518-
option(HAVE_IMG "Enable support for loading IMG images."
519-
${IS_NOT_MINSIZE_BUILD})
520-
option(HAVE_SOFTIMAGE_PIC
521-
"Enable support for loading SOFTIMAGE PIC images."
522-
${IS_NOT_MINSIZE_BUILD})
523-
option(HAVE_BMP "Enable support for loading BMP images."
524-
${IS_NOT_MINSIZE_BUILD})
525-
option(HAVE_PNM "Enable support for loading PNM images."
526-
${IS_NOT_MINSIZE_BUILD})
527-
528-
mark_as_advanced(HAVE_SGI_RGB HAVE_TGA
529-
HAVE_IMG HAVE_SOFTIMAGE_PIC HAVE_BMP HAVE_PNM)
507+
option(HAVE_SGI_RGB "Enable support for loading SGI RGB images." ON)
508+
option(HAVE_TGA "Enable support for loading TGA images." ON)
509+
option(HAVE_IMG "Enable support for loading IMG images." ON)
510+
option(HAVE_SOFTIMAGE_PIC "Enable support for loading SOFTIMAGE PIC images." ON)
511+
option(HAVE_BMP "Enable support for loading BMP images." ON)
512+
option(HAVE_PNM "Enable support for loading PNM images." ON)
513+
514+
foreach(adv_image_format
515+
HAVE_SGI_RGB HAVE_TGA HAVE_IMG HAVE_SOFTIMAGE_PIC HAVE_BMP HAVE_PNM)
516+
517+
option(${adv_image_format}_MinSizeRel "" OFF)
518+
list(APPEND PER_CONFIG_OPTIONS ${adv_image_format})
519+
520+
mark_as_advanced(${adv_image_format} ${adv_image_format}_MinSizeRel)
530521

522+
endforeach(adv_image_format)
531523

532524
# How to invoke bison and flex. Panda takes advantage of some
533525
# bison/flex features, and therefore specifically requires bison and
@@ -595,7 +587,7 @@ option(DO_PIPELINING "If on, compile with pipelined rendering." ON)
595587
option(COMPILE_IN_DEFAULT_FONT
596588
"If on, compiles in a default font, so that every TextNode will always
597589
have a font available without requiring the user to specify one.
598-
When turned off, the generated library will save a few kilobytes." ${IS_NOT_MINSIZE_BUILD})
590+
When turned off, the generated library will save a few kilobytes." ON)
599591
list(APPEND PER_CONFIG_OPTIONS COMPILE_IN_DEFAULT_FONT)
600592
set(COMPILE_IN_DEFAULT_FONT_MinSizeRel OFF CACHE BOOL "")
601593

0 commit comments

Comments
 (0)