CMake: Create wx-config for MinGW builds
Use the same output folder for setup.h and wx-config as configure does.
This commit is contained in:
parent
10abcc0f78
commit
4196c67b72
@ -140,19 +140,15 @@ else()
|
||||
set(wxCOMPILER_PREFIX)
|
||||
endif()
|
||||
|
||||
if(MSVC OR MINGW)
|
||||
if(MSVC)
|
||||
if(wxBUILD_SHARED)
|
||||
set(lib_suffix "dll")
|
||||
else()
|
||||
set(lib_suffix "lib")
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
# Include generator expression to suppress default Debug/Release pair
|
||||
set(wxPLATFORM_LIB_DIR "$<1:/>${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}_${lib_suffix}")
|
||||
else()
|
||||
set(wxPLATFORM_LIB_DIR "/${wxCOMPILER_PREFIX}${wxARCH_SUFFIX}_${lib_suffix}")
|
||||
endif()
|
||||
else()
|
||||
set(wxPLATFORM_LIB_DIR)
|
||||
endif()
|
||||
@ -164,7 +160,7 @@ if(wxBUILD_CUSTOM_SETUP_HEADER_PATH)
|
||||
set(wxSETUP_HEADER_PATH ${wxBUILD_CUSTOM_SETUP_HEADER_PATH})
|
||||
else()
|
||||
# Set path where setup.h will be created
|
||||
if(MSVC OR MINGW)
|
||||
if(MSVC)
|
||||
if(wxUSE_UNICODE)
|
||||
set(lib_unicode u)
|
||||
else()
|
||||
|
@ -12,27 +12,25 @@ if(NOT wxBUILD_INSTALL)
|
||||
endif()
|
||||
|
||||
install(CODE "message(STATUS \"Installing: Headers...\")")
|
||||
if(UNIX)
|
||||
wx_install(
|
||||
DIRECTORY "${wxSOURCE_DIR}/include/wx"
|
||||
DESTINATION "include/wx-${wxMAJOR_VERSION}.${wxMINOR_VERSION}")
|
||||
else()
|
||||
if(MSVC)
|
||||
wx_install(
|
||||
DIRECTORY "${wxSOURCE_DIR}/include/wx"
|
||||
DESTINATION "include")
|
||||
if(MSVC)
|
||||
wx_install(
|
||||
DIRECTORY "${wxSOURCE_DIR}/include/msvc"
|
||||
DESTINATION "include")
|
||||
endif()
|
||||
else()
|
||||
wx_install(
|
||||
DIRECTORY "${wxSOURCE_DIR}/include/wx"
|
||||
DESTINATION "include/wx-${wxMAJOR_VERSION}.${wxMINOR_VERSION}")
|
||||
endif()
|
||||
|
||||
# setup header and wx-config
|
||||
if(MSVC OR MINGW)
|
||||
if(MSVC)
|
||||
wx_install(
|
||||
DIRECTORY "${wxSETUP_HEADER_PATH}"
|
||||
DESTINATION "lib${wxPLATFORM_LIB_DIR}")
|
||||
elseif(UNIX)
|
||||
else()
|
||||
wx_install(
|
||||
DIRECTORY "${wxSETUP_HEADER_PATH}"
|
||||
DESTINATION "lib/wx/include")
|
||||
|
@ -37,7 +37,7 @@ if(NOT wxBUILD_CUSTOM_SETUP_HEADER_PATH)
|
||||
include(build/cmake/setup.cmake)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
if(NOT MSVC)
|
||||
# Write wx-config
|
||||
include(build/cmake/config.cmake)
|
||||
endif()
|
||||
|
@ -21,17 +21,17 @@ if(wxUSE_XRC)
|
||||
set_target_properties(wxrc PROPERTIES FOLDER "Utilities")
|
||||
|
||||
wx_install(TARGETS wxrc RUNTIME DESTINATION "bin")
|
||||
if(UNIX)
|
||||
if(NOT MSVC)
|
||||
install(CODE "execute_process( \
|
||||
COMMAND ${CMAKE_COMMAND} -E rename \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION} \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc${CMAKE_EXECUTABLE_SUFFIX} \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${CMAKE_EXECUTABLE_SUFFIX} \
|
||||
)"
|
||||
)
|
||||
install(CODE "execute_process( \
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION} \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc-${wxMAJOR_VERSION}.${wxMINOR_VERSION}${CMAKE_EXECUTABLE_SUFFIX} \
|
||||
${CMAKE_INSTALL_PREFIX}/bin/wxrc${CMAKE_EXECUTABLE_SUFFIX} \
|
||||
)"
|
||||
)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user