Skip to content

Commit

Permalink
Update FindwxWidgets.cmake to support recent msys/mingw versions.
Browse files Browse the repository at this point in the history
Changes are msys specific.
  • Loading branch information
jp-charras committed Jan 12, 2024
1 parent c18bfe0 commit d653cc6
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions cmake/FindwxWidgets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -866,17 +866,40 @@ else()
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)

if(_retv EQUAL 0)
file(TO_CMAKE_PATH ${_native_path} _native_path)
DBG_MSG_V("Path ${_path} converted to ${_native_path}")
set(_tmp_path "${_tmp_path} ${_native_path}")
endif()
endforeach()

DBG_MSG("Setting wxWidgets_INCLUDE_DIRS = ${_tmp_path}")
set(wxWidgets_INCLUDE_DIRS ${_tmp_path})
separate_arguments(wxWidgets_INCLUDE_DIRS)
list(REMOVE_ITEM wxWidgets_INCLUDE_DIRS "")

set(_tmp_path "")
foreach(_path ${wxWidgets_LIBRARY_DIRS})
execute_process(
COMMAND cygpath -w ${_path}
OUTPUT_VARIABLE _native_path
RESULT_VARIABLE _retv
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_QUIET
)
if(_retv EQUAL 0)
file(TO_CMAKE_PATH ${_native_path} _native_path)
DBG_MSG_V("Path ${_path} converted to ${_native_path}")
string(APPEND _tmp_path " ${_native_path}")
endif()
endforeach()
DBG_MSG("Setting wxWidgets_LIBRARY_DIRS = ${_tmp_path}")
set(wxWidgets_LIBRARY_DIRS ${_tmp_path})
separate_arguments(wxWidgets_LIBRARY_DIRS)
list(REMOVE_ITEM wxWidgets_LIBRARY_DIRS "")
endif()

endif()
#=====================================================================
# Neither UNIX_FIND_STYLE, nor WIN32_FIND_STYLE
Expand Down

0 comments on commit d653cc6

Please sign in to comment.