From 483a7b27476b9412bfdba1140b6bb90e90c51b30 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Wed, 5 Nov 2014 19:39:36 +0300 Subject: [PATCH] A small cmake enhancement: An ugly if-condition replaced with a CACHE'd cmake variable. --- CMakeLists.txt | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0d4e73b0a..25d55f0d63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -269,20 +269,15 @@ if( USE_WX_GRAPHICS_CONTEXT ) endif() -# Allow user to override the default settings for adding images to menu items. By default -# images in menu items are enabled on all platforms except OSX. This can be over ridden by -# defining -DUSE_IMAGES_IN_MENUS=ON/OFF to force the preferred behavior. -if( NOT DEFINED USE_IMAGES_IN_MENUS ) - if( NOT APPLE ) - set( USE_IMAGES_IN_MENUS ON ) - endif() +# By default images in menu items are enabled on all platforms except OSX. +if( NOT APPLE ) + set ( USE_IMAGES_IN_MENUS ON CACHE BOOL "Enable images in menus" ) else() - if( USE_IMAGES_IN_MENUS ) - set( USE_IMAGES_IN_MENUS ON ) - endif() + set ( USE_IMAGES_IN_MENUS OFF CACHE BOOL "Enable images in menus" ) endif() + # KIFACE_SUFFIX is the file extension used for top level program modules which # implement the KIFACE interface. A valid suffix starts with a period '.'.