mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-25 07:31:33 +08:00
c53be0e97d
* Modernised CMake build files and CI configs Fixed include formats * Fixed build errors and warnings * Fixes to allow CMake find_package
23 lines
899 B
CMake
23 lines
899 B
CMake
cmake_minimum_required(VERSION 3.5)
|
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
|
|
include(GetGitRevisionDescription)
|
|
git_describe(GitTagVersion --tags)
|
|
string(REGEX REPLACE "^([0-9]+)\\..*" "\\1" VERSION_MAJOR "${GitTagVersion}")
|
|
string(REGEX REPLACE "^[0-9]+\\.([0-9]+).*" "\\1" VERSION_MINOR "${GitTagVersion}")
|
|
string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" VERSION_PATCH "${GitTagVersion}")
|
|
set(VERSION_SHORT "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
|
project(QtADS LANGUAGES CXX VERSION ${VERSION_SHORT})
|
|
option(BUILD_STATIC "Build the static library" OFF)
|
|
option(BUILD_EXAMPLES "Build the examples" ON)
|
|
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "4")
|
|
set(ads_PlatformDir "x86")
|
|
else()
|
|
set(ads_PlatformDir "x64")
|
|
endif()
|
|
add_subdirectory(src)
|
|
if(BUILD_EXAMPLES)
|
|
add_subdirectory(examples)
|
|
add_subdirectory(demo)
|
|
endif()
|
|
|