Add CMake build system

Add CMake build system for libraries, tests and samples
update_files.py converts build/files into CMake format.
build/update-setup-h has been modified to update build/cmake/setup.h.in.
This commit is contained in:
Tobias Taschner
2016-09-25 22:19:39 +02:00
parent ee197fd913
commit da2b8ea812
55 changed files with 13376 additions and 0 deletions

49
build/cmake/install.cmake Normal file
View File

@@ -0,0 +1,49 @@
#############################################################################
# Name: build/cmake/install.cmake
# Purpose: Install target CMake file
# Author: Tobias Taschner
# Created: 2016-10-17
# Copyright: (c) 2016 wxWidgets development team
# Licence: wxWindows licence
#############################################################################
if(NOT wxBUILD_INSTALL)
return()
endif()
install(CODE "message(STATUS \"Installing: Headers...\")")
wx_install(
DIRECTORY "${wxSOURCE_DIR}/include/wx"
DESTINATION "include")
if(MSVC)
wx_install(
DIRECTORY "${wxSOURCE_DIR}/include/msvc"
DESTINATION "include")
endif()
if(MSVC OR MINGW)
wx_install(
DIRECTORY "${wxSETUP_HEADER_PATH}"
DESTINATION "lib${wxPLATFORM_LIB_DIR}")
endif()
# uninstall target
if(MSVC_IDE)
set(UNINST_NAME UNINSTALL)
else()
set(UNINST_NAME uninstall)
endif()
if(NOT TARGET ${UNINST_NAME})
configure_file(
"${wxSOURCE_DIR}/build/cmake/uninstall.cmake.in"
"${wxBINARY_DIR}/uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(${UNINST_NAME}
COMMAND ${CMAKE_COMMAND} -P ${wxBINARY_DIR}/uninstall.cmake)
get_property(PREDEF_FOLDER GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER)
if(NOT PREDEF_FOLDER)
set(PREDEF_FOLDER "CMakePredefinedTargets")
endif()
set_target_properties(${UNINST_NAME} PROPERTIES FOLDER "${PREDEF_FOLDER}")
endif()