Use output directory under wx directory in the build tree

CMAKE_CURRENT_BINARY_DIR is the same as CMAKE_BINARY_DIR when building
wx directly, but they can be different when including this makefile from
a super-project using add_subdirectory() and it makes more sense to use
the former.

This also fixes wx-config symlink created in such build, as it the link
was broken before because it was created under CMAKE_CURRENT_BINARY_DIR
but pointed to a file in a different CMAKE_BINARY_DIR.
This commit is contained in:
Vadim Zeitlin 2022-09-21 20:04:15 +02:00
parent 969b1fad4c
commit 3dcb7a415f

View file

@ -44,7 +44,7 @@ include(build/cmake/policies.cmake NO_POLICY_SCOPE)
# Initialize variables for quick access to wx root dir in sub dirs
set(wxSOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(wxBINARY_DIR ${CMAKE_BINARY_DIR})
set(wxBINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(wxOUTPUT_DIR ${wxBINARY_DIR}/lib)
# parse the version number from wx/version.h and include in wxMAJOR_VERSION and wxMINOR_VERSION