mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-17 17:02:51 +08:00
CMake: Use global variable to keep track of installed files
This commit is contained in:
@@ -13,9 +13,11 @@ include(CMakePrintHelpers)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
# List of libraries added via wx_add_library() to use for wx-config
|
||||
# and headers added via wx_append_sources() to use for install.
|
||||
set(wxLIB_TARGETS)
|
||||
# List of headers added via wx_append_sources() to use for install
|
||||
set(wxINSTALL_HEADERS)
|
||||
# List of files not included in the install manifest
|
||||
set(WX_EXTRA_UNINSTALL_FILES)
|
||||
|
||||
|
||||
# This function adds a list of headers to a variable while prepending
|
||||
|
||||
@@ -71,6 +71,7 @@ else()
|
||||
\"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${runtime_dir}/wx-config\" \
|
||||
)"
|
||||
)
|
||||
list(APPEND WX_EXTRA_UNINSTALL_FILES "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${runtime_dir}/wx-config")
|
||||
endif()
|
||||
|
||||
wx_get_install_dir(library)
|
||||
@@ -114,21 +115,6 @@ else()
|
||||
endif()
|
||||
|
||||
if(NOT TARGET ${UNINST_NAME})
|
||||
# these symlinks are not included in the install manifest
|
||||
set(WX_EXTRA_UNINSTALL_FILES)
|
||||
if(NOT WIN32_MSVC_NAMING)
|
||||
if(IPHONE)
|
||||
set(EXE_SUFFIX ".app")
|
||||
else()
|
||||
set(EXE_SUFFIX ${CMAKE_EXECUTABLE_SUFFIX})
|
||||
endif()
|
||||
|
||||
set(WX_EXTRA_UNINSTALL_FILES
|
||||
"${CMAKE_INSTALL_PREFIX}/${runtime_dir}/wx-config"
|
||||
"${CMAKE_INSTALL_PREFIX}/${runtime_dir}/wxrc${EXE_SUFFIX}"
|
||||
)
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
"${wxSOURCE_DIR}/build/cmake/uninstall.cmake.in"
|
||||
"${wxBINARY_DIR}/uninstall.cmake"
|
||||
|
||||
@@ -45,6 +45,8 @@ if(wxUSE_XRC)
|
||||
\"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${runtime_dir}/wxrc${EXE_SUFFIX}\" \
|
||||
)"
|
||||
)
|
||||
list(APPEND WX_EXTRA_UNINSTALL_FILES "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${runtime_dir}/wxrc${EXE_SUFFIX}")
|
||||
set(WX_EXTRA_UNINSTALL_FILES ${WX_EXTRA_UNINSTALL_FILES} PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user