cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR) set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "" FORCE) project(rsc CXX) ################################################################################ # Set target if not provided ################################################################################ if(NOT CMAKE_VS_PLATFORM_NAME) set(CMAKE_VS_PLATFORM_NAME "x64") endif() message("** ${CMAKE_VS_PLATFORM_NAME} target in use") if(NOT ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "ARM" OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64" OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")) message(FATAL_ERROR "** ${CMAKE_VS_PLATFORM_NAME} target is not supported") endif() ################################################################################ # Global configuration types ################################################################################ set(CMAKE_CONFIGURATION_TYPES "Debug" "Release" CACHE STRING "" FORCE ) ################################################################################ # Global compiler options ################################################################################ if(MSVC) # remove default flags provided with CMake for MSVC set(CMAKE_CXX_FLAGS "") set(CMAKE_CXX_FLAGS_DEBUG "") set(CMAKE_CXX_FLAGS_RELEASE "") endif() ################################################################################ # Global linker options ################################################################################ if(MSVC) # remove default flags provided with CMake for MSVC set(CMAKE_EXE_LINKER_FLAGS "") set(CMAKE_MODULE_LINKER_FLAGS "") set(CMAKE_SHARED_LINKER_FLAGS "") set(CMAKE_STATIC_LINKER_FLAGS "") set(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS}") set(CMAKE_MODULE_LINKER_FLAGS_DEBUG "${CMAKE_MODULE_LINKER_FLAGS}") set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS}") set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "${CMAKE_STATIC_LINKER_FLAGS}") set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS}") set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS}") set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS}") set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${CMAKE_STATIC_LINKER_FLAGS}") endif() ################################################################################ # Nuget packages function stub ################################################################################ function(use_package TARGET PACKAGE VERSION) message(WARNING "** No implementation of use_package. Create yours. " "Package \"${PACKAGE}\" with version \"${VERSION}\" " "for target \"${TARGET}\" is ignored!") endfunction() ################################################################################ # Common utilities ################################################################################ include(CMake/Utils.cmake) ################################################################################ # Additional global settings (defines most of RSC's compile and link options) ################################################################################ include(CMake/GlobalSettingsInclude.cmake) ################################################################################ # Use solution folders feature ################################################################################ set_property(GLOBAL PROPERTY USE_FOLDERS ON) ################################################################################ # Subprojects ################################################################################ add_subdirectory(an) add_subdirectory(app) add_subdirectory(cb) add_subdirectory(cn) add_subdirectory(ct) add_subdirectory(dip) add_subdirectory(launcher) add_subdirectory(mb) add_subdirectory(nb) add_subdirectory(nt) add_subdirectory(nw) add_subdirectory(on) add_subdirectory(pb) add_subdirectory(rn) add_subdirectory(rsc) add_subdirectory(sb) add_subdirectory(sn) add_subdirectory(st) add_subdirectory(subs)