From 86d072b5d13e10b6274aecc9200d82c7934d96e6 Mon Sep 17 00:00:00 2001 From: Simon Richter Date: Mon, 15 Feb 2016 18:48:40 +0100 Subject: [PATCH] FindwxWidgets.cmake: Remove arguments from else() and end*() To reduce differences with upstream FindwxWidgets.cmake, use their style of ending blocks. --- CMakeModules/FindwxWidgets.cmake | 204 +++++++++++++++---------------- 1 file changed, 101 insertions(+), 103 deletions(-) diff --git a/CMakeModules/FindwxWidgets.cmake b/CMakeModules/FindwxWidgets.cmake index 5a21f75f41..55e057dfd9 100644 --- a/CMakeModules/FindwxWidgets.cmake +++ b/CMakeModules/FindwxWidgets.cmake @@ -151,10 +151,10 @@ # two versions for controlling how verbose your output should be. macro(dbg_msg _MSG) # message(STATUS "${_MSG}") -endmacro(dbg_msg) +endmacro() macro(dbg_msg_v _MSG) # message(STATUS "${_MSG}") -endmacro(dbg_msg_v) +endmacro() # Clear return values in case the module is loaded more than once. set(wxWidgets_FOUND FALSE) @@ -171,7 +171,7 @@ set(wxWidgets_CXX_FLAGS "") # - else set wxWidgets_FIND_COMPONENTS to wxWidgets_USE_LIBS if(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS) set(wxWidgets_FIND_COMPONENTS ${wxWidgets_USE_LIBS}) -endif(wxWidgets_USE_LIBS AND NOT wxWidgets_FIND_COMPONENTS) +endif() dbg_msg("wxWidgets_FIND_COMPONENTS : ${wxWidgets_FIND_COMPONENTS}") # Add the convenience use file if available. @@ -187,9 +187,9 @@ get_filename_component( if(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") set(wxWidgets_USE_FILE "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") -else(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") +else() set(wxWidgets_USE_FILE UsewxWidgets) -endif(EXISTS "${wxWidgets_CURRENT_LIST_DIR}/UsewxWidgets.cmake") +endif() #===================================================================== #===================================================================== @@ -218,17 +218,17 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") if(NOT wxWidgets_FIND_COMPONENTS) if(wxWidgets_USE_MONOLITHIC) set(wxWidgets_FIND_COMPONENTS mono) - else(wxWidgets_USE_MONOLITHIC) + else() set(wxWidgets_FIND_COMPONENTS core base) # this is default - endif(wxWidgets_USE_MONOLITHIC) - endif(NOT wxWidgets_FIND_COMPONENTS) + endif() + endif() # Add the common (usually required libs) unless # wxWidgets_EXCLUDE_COMMON_LIBRARIES has been set. if(NOT wxWidgets_EXCLUDE_COMMON_LIBRARIES) list(APPEND wxWidgets_FIND_COMPONENTS ${wxWidgets_COMMON_LIBRARIES}) - endif(NOT wxWidgets_EXCLUDE_COMMON_LIBRARIES) + endif() #------------------------------------------------------------------- # WIN32: Helper MACROS @@ -243,9 +243,9 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") string(REGEX REPLACE "msw.*(u)[d]*$" "u" ${_UCD} "${_CONFIGURATION}") if(${_UCD} STREQUAL ${_CONFIGURATION}) set(${_UCD} "") - endif(${_UCD} STREQUAL ${_CONFIGURATION}) + endif() string(REGEX MATCH "d$" ${_DBG} "${_CONFIGURATION}") - endmacro(wx_get_name_components) + endmacro() # # Find libraries associated to a configuration. @@ -267,7 +267,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") NO_DEFAULT_PATH ) mark_as_advanced(WX_${LIB}${_DBG}) - endforeach(LIB) + endforeach() dbg_msg( "WX_LIB_DIR:${WX_LIB_DIR}" ) @@ -299,7 +299,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") NO_DEFAULT_PATH ) mark_as_advanced(WX_${LIB}${_DBG}) - endforeach(LIB) + endforeach() # Find wxWidgets monolithic library. find_library(WX_mono${_DBG} @@ -332,8 +332,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") NO_DEFAULT_PATH ) mark_as_advanced(WX_${LIB}${_DBG}) - endforeach(LIB) - endmacro(wx_find_libs) + endforeach() + endmacro() # # Clear all library paths, so that FIND_LIBRARY refinds them. @@ -343,19 +343,19 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") set(${_LIB} "${_LIB}-NOTFOUND" CACHE FILEPATH "Cleared." FORCE) set(${_LIB}_FOUND FALSE) mark_as_advanced(${_LIB}) - endmacro(wx_clear_lib) + endmacro() # Clear all debug or release library paths (arguments are "d" or ""). macro(wx_clear_all_libs _DBG) # Clear wxWidgets common libraries. foreach(LIB ${wxWidgets_COMMON_LIBRARIES} scintilla) wx_clear_lib(WX_${LIB}${_DBG}) - endforeach(LIB) + endforeach() # Clear wxWidgets multilib base libraries. wx_clear_lib(WX_base${_DBG}) foreach(LIB net odbc xml) wx_clear_lib(WX_${LIB}${_DBG}) - endforeach(LIB) + endforeach() # Clear wxWidgets monolithic library. wx_clear_lib(WX_mono${_DBG}) @@ -364,16 +364,16 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") foreach(LIB core adv aui html media xrc dbgrid gl qa richtext webview stc ribbon propgrid) wx_clear_lib(WX_${LIB}${_DBG}) - endforeach(LIB) - endmacro(wx_clear_all_libs) + endforeach() + endmacro() # Clear all wxWidgets debug libraries. macro(wx_clear_all_dbg_libs) wx_clear_all_libs("d") - endmacro(wx_clear_all_dbg_libs) + endmacro() # Clear all wxWidgets release libraries. macro(wx_clear_all_rel_libs) wx_clear_all_libs("") - endmacro(wx_clear_all_rel_libs) + endmacro() # # Set the wxWidgets_LIBRARIES variable. @@ -391,35 +391,35 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") list(APPEND wxWidgets_LIBRARIES debug ${WX_${LIB}d} optimized ${WX_${LIB}} ) - else(WX_${LIB} AND WX_${LIB}d) + else() dbg_msg_v("- not found due to missing WX_${LIB}=${WX_${LIB}} or WX_${LIB}d=${WX_${LIB}d}") set(wxWidgets_FOUND FALSE) - endif(WX_${LIB} AND WX_${LIB}d) - endforeach(LIB) - else(WX_USE_REL_AND_DBG) + endif() + endforeach() + else() foreach(LIB ${${_LIBS}}) dbg_msg_v("Searching for ${LIB}${_DBG}") dbg_msg_v("WX_${LIB}${_DBG} : ${WX_${LIB}${_DBG}}") if(WX_${LIB}${_DBG}) dbg_msg_v("Found ${LIB}${_DBG}") list(APPEND wxWidgets_LIBRARIES ${WX_${LIB}${_DBG}}) - else(WX_${LIB}${_DBG}) + else() dbg_msg_v( "- not found due to missing WX_${LIB}${_DBG}=${WX_${LIB}${_DBG}}") set(wxWidgets_FOUND FALSE) - endif(WX_${LIB}${_DBG}) - endforeach(LIB) - endif(WX_USE_REL_AND_DBG) + endif() + endforeach() + endif() dbg_msg_v("OpenGL") list(FIND ${_LIBS} gl WX_USE_GL) if(NOT WX_USE_GL EQUAL -1) dbg_msg_v("- is required.") list(APPEND wxWidgets_LIBRARIES opengl32 glu32) - endif(NOT WX_USE_GL EQUAL -1) + endif() list(APPEND wxWidgets_LIBRARIES winmm comctl32 rpcrt4 wsock32) - endmacro(wx_set_libraries) + endmacro() #------------------------------------------------------------------- # WIN32: Start actual work. @@ -481,7 +481,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") CACHE INTERNAL "wxWidgets_ROOT_DIR") set(wxWidgets_LIB_DIR "wxWidgets_LIB_DIR-NOTFOUND" CACHE PATH "Cleared." FORCE) - endif(NOT WX_ROOT_DIR STREQUAL wxWidgets_ROOT_DIR) + endif() if(WX_ROOT_DIR) dbg_msg( "WX_ROOT_DIR == wxWidgets_ROOT_DIR" ) @@ -492,9 +492,9 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") if(MINGW) dbg_msg( "MINGW" ) set(WX_LIB_DIR_PREFIX gcc) - else(MINGW) + else() set(WX_LIB_DIR_PREFIX vc) - endif(MINGW) + endif() if(BUILD_SHARED_LIBS) dbg_msg( "BUILD_SHARED_LIBS" ) find_path(wxWidgets_LIB_DIR @@ -513,7 +513,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") DOC "Path to wxWidgets libraries?" NO_DEFAULT_PATH ) - else(BUILD_SHARED_LIBS) + else() dbg_msg( "!BUILD_SHARED_LIBS WX_LIB_DIR:${WX_LIB_DIR}" ) find_path(wxWidgets_LIB_DIR NAMES @@ -531,21 +531,21 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") DOC "Path to wxWidgets libraries?" NO_DEFAULT_PATH ) - endif(BUILD_SHARED_LIBS) + endif() # If wxWidgets_LIB_DIR changed, clear all libraries. if(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR) set(WX_LIB_DIR ${wxWidgets_LIB_DIR} CACHE INTERNAL "wxWidgets_LIB_DIR") wx_clear_all_dbg_libs() wx_clear_all_rel_libs() - endif(NOT WX_LIB_DIR STREQUAL wxWidgets_LIB_DIR) + endif() if(WX_LIB_DIR) # If building shared libs, define WXUSINGDLL to use dllimport. if(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*") set(wxWidgets_DEFINITIONS WXUSINGDLL) dbg_msg_v("detected SHARED/DLL tree WX_LIB_DIR=${WX_LIB_DIR}") - endif(WX_LIB_DIR MATCHES ".*[dD][lL][lL].*") + endif() # Search for available configuration types. foreach(CFG mswunivud mswunivd mswud mswd mswunivu mswuniv mswu msw) @@ -554,8 +554,8 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") list(APPEND WX_CONFIGURATION_LIST ${CFG}) set(WX_${CFG}_FOUND TRUE) set(WX_CONFIGURATION ${CFG}) - endif(EXISTS ${WX_LIB_DIR}/${CFG}) - endforeach(CFG) + endif() + endforeach() dbg_msg_v("WX_CONFIGURATION_LIST=${WX_CONFIGURATION_LIST}") if(WX_CONFIGURATION) @@ -568,24 +568,24 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") if(NOT WX_${wxWidgets_CONFIGURATION}_FOUND) set(wxWidgets_CONFIGURATION ${WX_CONFIGURATION} CACHE STRING "Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE) - else(NOT WX_${wxWidgets_CONFIGURATION}_FOUND) + else() set(wxWidgets_CONFIGURATION ${wxWidgets_CONFIGURATION} CACHE STRING "Set wxWidgets configuration (${WX_CONFIGURATION_LIST})" FORCE) - endif(NOT WX_${wxWidgets_CONFIGURATION}_FOUND) + endif() # If release config selected, and both release/debug exist. if(WX_${wxWidgets_CONFIGURATION}d_FOUND) OPTION(wxWidgets_USE_REL_AND_DBG "Use release and debug configurations?" TRUE) set(WX_USE_REL_AND_DBG ${wxWidgets_USE_REL_AND_DBG}) - else(WX_${wxWidgets_CONFIGURATION}d_FOUND) + else() # If the option exists (already in cache), force it false. if(wxWidgets_USE_REL_AND_DBG) set(wxWidgets_USE_REL_AND_DBG FALSE CACHE BOOL "No ${wxWidgets_CONFIGURATION}d found." FORCE) - endif(wxWidgets_USE_REL_AND_DBG) + endif() set(WX_USE_REL_AND_DBG FALSE) - endif(WX_${wxWidgets_CONFIGURATION}d_FOUND) + endif() # Get configuration parameters from the name. wx_get_name_components(${wxWidgets_CONFIGURATION} UNV UCD DBG) @@ -594,24 +594,24 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") if(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) set(wxWidgets_INCLUDE_DIRS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}) - else(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) + else() dbg_msg("wxWidgets_FOUND FALSE because ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h does not exists.") set(wxWidgets_FOUND FALSE) - endif(EXISTS ${WX_LIB_DIR}/${wxWidgets_CONFIGURATION}/wx/setup.h) + endif() # Set wxWidgets main include directory. if(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) list(APPEND wxWidgets_INCLUDE_DIRS ${WX_ROOT_DIR}/include) - else(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) + else() dbg_msg("wxWidgets_FOUND FALSE because WX_ROOT_DIR=${WX_ROOT_DIR} has no ${WX_ROOT_DIR}/include/wx/wx.h") set(wxWidgets_FOUND FALSE) - endif(EXISTS ${WX_ROOT_DIR}/include/wx/wx.h) + endif() # Find wxWidgets libraries. wx_find_libs("${UNV}" "${UCD}" "${DBG}") if(WX_USE_REL_AND_DBG) wx_find_libs("${UNV}" "${UCD}" "d") - endif(WX_USE_REL_AND_DBG) + endif() # Settings for requested libs (i.e., include dir, libraries, etc.). wx_set_libraries(wxWidgets_FIND_COMPONENTS "${DBG}") @@ -619,19 +619,19 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32") # Add necessary definitions for unicode builds if("${UCD}" STREQUAL "u") list(APPEND wxWidgets_DEFINITIONS UNICODE _UNICODE) - endif("${UCD}" STREQUAL "u") + endif() # Add necessary definitions for debug builds set(wxWidgets_DEFINITIONS_DEBUG _DEBUG __WXDEBUG__) - endif(WX_CONFIGURATION) - endif(WX_LIB_DIR) - endif(WX_ROOT_DIR) + endif() + endif() + endif() #===================================================================== # UNIX_FIND_STYLE #===================================================================== -else(wxWidgets_FIND_STYLE STREQUAL "win32") +else() dbg_msg("NOT win32 path") if(wxWidgets_FIND_STYLE STREQUAL "unix") @@ -656,16 +656,16 @@ else(wxWidgets_FIND_STYLE STREQUAL "win32") string(TOUPPER ${_opt_name} _upper_opt_name) if(_wx_selected_config MATCHES ".*${_opt_name}.*") set(wxWidgets_DEFAULT_${_upper_opt_name} ON) - else(_wx_selected_config MATCHES ".*${_opt_name}.*") + else() set(wxWidgets_DEFAULT_${_upper_opt_name} OFF) - endif(_wx_selected_config MATCHES ".*${_opt_name}.*") - endforeach(_opt_name) - else(_wx_result EQUAL 0) + endif() + endforeach() + else() foreach(_upper_opt_name DEBUG STATIC UNICODE UNIVERSAL) set(wxWidgets_DEFAULT_${_upper_opt_name} OFF) - endforeach(_upper_opt_name) - endif(_wx_result EQUAL 0) - endmacro(wx_config_select_get_default) + endforeach() + endif() + endmacro() # # Query a boolean configuration option to determine if the system @@ -691,17 +691,17 @@ else(wxWidgets_FIND_STYLE STREQUAL "win32") if(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0) OPTION(wxWidgets_USE_${_UPPER_OPT_NAME} ${_OPT_HELP} ${wxWidgets_DEFAULT_${_UPPER_OPT_NAME}}) - else(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0) + else() # If option exists (already in cache), force to available one. if(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME}) if(_wx_result_yes EQUAL 0) set(wxWidgets_USE_${_UPPER_OPT_NAME} ON CACHE BOOL ${_OPT_HELP} FORCE) - else(_wx_result_yes EQUAL 0) + else() set(wxWidgets_USE_${_UPPER_OPT_NAME} OFF CACHE BOOL ${_OPT_HELP} FORCE) - endif(_wx_result_yes EQUAL 0) - endif(DEFINED wxWidgets_USE_${_UPPER_OPT_NAME}) - endif(_wx_result_yes EQUAL 0 AND _wx_result_no EQUAL 0) - endmacro(wx_config_select_query_bool) + endif() + endif() + endif() + endmacro() # # Set wxWidgets_SELECT_OPTIONS to wx-config options for selecting @@ -714,12 +714,12 @@ else(wxWidgets_FIND_STYLE STREQUAL "win32") if(DEFINED wxWidgets_USE_${_upper_opt_name}) if(wxWidgets_USE_${_upper_opt_name}) list(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=yes) - else(wxWidgets_USE_${_upper_opt_name}) + else() list(APPEND wxWidgets_SELECT_OPTIONS --${_opt_name}=no) - endif(wxWidgets_USE_${_upper_opt_name}) - endif(DEFINED wxWidgets_USE_${_upper_opt_name}) - endforeach(_opt_name) - endmacro(wx_config_select_set_options) + endif() + endif() + endforeach() + endmacro() #----------------------------------------------------------------- # UNIX: Start actual work. @@ -786,10 +786,10 @@ else(wxWidgets_FIND_STYLE STREQUAL "win32") dbg_msg_v("wxWidgets_INCLUDE_DIRS=${wxWidgets_INCLUDE_DIRS}") dbg_msg_v("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}") - else(RET EQUAL 0) + else() set(wxWidgets_FOUND FALSE) dbg_msg_v("${wxWidgets_CONFIG_EXECUTABLE} --cxxflags FAILED with RET=${RET}") - endif(RET EQUAL 0) + endif() # run the wx-config program to get the libs # - NOTE: wx-config doesn't verify that the libs requested exist @@ -823,11 +823,10 @@ else(wxWidgets_FIND_STYLE STREQUAL "win32") dbg_msg_v("wxWidgets_LIBRARIES=${wxWidgets_LIBRARIES}") dbg_msg_v("wxWidgets_LIBRARY_DIRS=${wxWidgets_LIBRARY_DIRS}") - else(RET EQUAL 0) + else() set(wxWidgets_FOUND FALSE) - dbg_msg("${wxWidgets_CONFIG_EXECUTABLE} --libs ${wxWidgets_FIND_COMPONENTS} FAILED with RET=${RET}") - endif(RET EQUAL 0) - endif(wxWidgets_CONFIG_EXECUTABLE) + endif() + endif() # When using wx-config in MSYS, the include paths are UNIX style paths which may or may # not work correctly depending on you MSYS/MinGW configuration. CMake expects native @@ -860,17 +859,16 @@ else(wxWidgets_FIND_STYLE STREQUAL "win32") #===================================================================== # Neither UNIX_FIND_STYLE, nor WIN32_FIND_STYLE #===================================================================== - else(wxWidgets_FIND_STYLE STREQUAL "unix") + else() if(NOT wxWidgets_FIND_QUIETLY) message(STATUS "${CMAKE_CURRENT_LIST_FILE}(${CMAKE_CURRENT_LIST_LINE}): \n" " Platform unknown/unsupported. It's neither WIN32 nor UNIX " "find style." ) - endif(NOT wxWidgets_FIND_QUIETLY) - endif(wxWidgets_FIND_STYLE STREQUAL "unix") -endif(wxWidgets_FIND_STYLE STREQUAL "win32") - + endif() + endif() +endif() # Check if a specfic version was requested by find_package(). if(wxWidgets_FOUND AND wxWidgets_FIND_VERSION) @@ -944,7 +942,7 @@ find_program(wxWidgets_wxrc_EXECUTABLE wxrc # function(wxwidgets_add_resources outfiles) # wx_split_arguments_on(OPTIONS wxrc_files wxrc_options ${ARGN}) # ... -# endfunction(wxwidgets_add_resources) +# endfunction() # # wxwidgets_add_resources(sources ${xrc_files} OPTIONS -e -o file.C) # @@ -966,18 +964,18 @@ function(wx_split_arguments_on _keyword _leftvar _rightvar) foreach(element ${ARGN}) if("${element}" STREQUAL "${_keyword}") set(_doing_right TRUE) - else("${element}" STREQUAL "${_keyword}") + else() if(_doing_right) list(APPEND ${_rightvar} "${element}") - else(_doing_right) + else() list(APPEND ${_leftvar} "${element}") - endif(_doing_right) - endif("${element}" STREQUAL "${_keyword}") - endforeach(element) + endif() + endif() + endforeach() set(${_leftvar} ${${_leftvar}} PARENT_SCOPE) set(${_rightvar} ${${_rightvar}} PARENT_SCOPE) -endfunction(wx_split_arguments_on) +endfunction() # # wx_get_dependencies_from_xml( @@ -1009,14 +1007,14 @@ function(wx_get_dependencies_from_xml # make the file have an absolute path if(NOT IS_ABSOLUTE "${dep_file}") set(dep_file "${${_depends_path}}/${dep_file}") - endif(NOT IS_ABSOLUTE "${dep_file}") + endif() # append file to dependency list list(APPEND ${_depends} "${dep_file}") - endforeach(dep_file) + endforeach() set(${_depends} ${${_depends}} PARENT_SCOPE) -endfunction(wx_get_dependencies_from_xml) +endfunction() # # wxwidgets_add_resources( @@ -1071,7 +1069,7 @@ function(wxwidgets_add_resources _outfiles) rc_file_contents depends_path ) - endforeach(rc_file) + endforeach() # # Parse options. @@ -1083,11 +1081,11 @@ function(wxwidgets_add_resources _outfiles) list(APPEND rc_options --cpp-code) # wxrc's default output filename for cpp code. set(outfile resource.cpp) - else(index EQUAL -1) + else() list(REMOVE_AT rc_options ${index}) # wxrc's default output filename for xrs file. set(outfile resource.xrs) - endif(index EQUAL -1) + endif() # Get output name for use in add_custom_command. # - short option scanning @@ -1096,18 +1094,18 @@ function(wxwidgets_add_resources _outfiles) MATH(EXPR filename_index "${index} + 1") list(GET rc_options ${filename_index} outfile) #list(REMOVE_AT rc_options ${index} ${filename_index}) - endif(NOT index EQUAL -1) + endif() # - long option scanning string(REGEX MATCH "--output=[^;]*" outfile_opt "${rc_options}") if(outfile_opt) string(REPLACE "--output=" "" outfile "${outfile_opt}") - endif(outfile_opt) + endif() #string(REGEX REPLACE "--output=[^;]*;?" "" rc_options "${rc_options}") #string(REGEX REPLACE ";$" "" rc_options "${rc_options}") if(NOT IS_ABSOLUTE "${outfile}") set(outfile "${CMAKE_CURRENT_BINARY_DIR}/${outfile}") - endif(NOT IS_ABSOLUTE "${outfile}") + endif() add_custom_command( OUTPUT "${outfile}" COMMAND ${wxWidgets_wxrc_EXECUTABLE} ${rc_options} ${rc_file_list_abs} @@ -1124,10 +1122,10 @@ function(wxwidgets_add_resources _outfiles) set_source_files_properties( "${outfile_header}" PROPERTIES GENERATED TRUE ) - endif(NOT short_index EQUAL -1 OR NOT long_index EQUAL -1) + endif() # Add generated file to output file list. list(APPEND ${_outfiles} "${outfile}") set(${_outfiles} ${${_outfiles}} PARENT_SCOPE) -endfunction(wxwidgets_add_resources) +endfunction()