Skip to content

Commit

Permalink
fix(#1947): report errors for FindwxWidgets.cmake
Browse files Browse the repository at this point in the history
under Unix
  • Loading branch information
slodki committed Apr 28, 2019
1 parent 2dd0164 commit 6d43186
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions util/FindwxWidgets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -938,24 +938,17 @@ foreach(_wx_lib_ ${wxWidgets_LIBRARIES})
if(";${_wx_lib_name};" MATCHES "[^a-z]${_cmp}u?[^a-z]")
set(wxWidgets_${_cmp}_FOUND FALSE)
endif()
endforeach()
endforeach()
endif()
unset(_wx_lib_found CACHE)
endif()
endforeach()

if(_wx_lib_missing)
string(REPLACE ";" " " _wx_lib_missing "${_wx_lib_missing}")
DBG_MSG_V("wxWidgets not found due to following missing libraries: ${_wx_lib_missing}")
set(wxWidgets_FOUND FALSE)
unset(wxWidgets_LIBRARIES)
endif()
foreach(_cmp IN LISTS wxWidgets_FIND_COMPONENTS)
if(wxWidgets_FOUND AND wxWidgets_FIND_REQUIRED_${_cmp} AND NOT DEFINED wxWidgets_${_cmp}_FOUND)
if(wxWidgets_FIND_REQUIRED_${_cmp} AND NOT DEFINED wxWidgets_${_cmp}_FOUND)
set(wxWidgets_${_cmp}_FOUND TRUE)
endif()
endforeach()
unset(_wx_lib_missing)

# Check if a specific version was requested by find_package().
if(wxWidgets_FOUND)
Expand All @@ -981,6 +974,13 @@ if(wxWidgets_FOUND)
dbg_msg("wxWidgets_VERSION_STRING: ${wxWidgets_VERSION_STRING}")
endif()

if(_wx_lib_missing)
string(REPLACE ";" " " _wx_lib_missing "${_wx_lib_missing}")
DBG_MSG_V("wxWidgets not found due to following missing libraries: ${_wx_lib_missing}")
set(wxWidgets_FOUND FALSE)
endif()
unset(_wx_lib_missing)

# Debug output:
DBG_MSG("wxWidgets_FOUND : ${wxWidgets_FOUND}")
DBG_MSG("wxWidgets_INCLUDE_DIRS : ${wxWidgets_INCLUDE_DIRS}")
Expand Down

0 comments on commit 6d43186

Please sign in to comment.