@@ -55,11 +55,31 @@ if (NOT DEFINED AREG_SDK_TOOLS OR "${AREG_SDK_TOOLS}" STREQUAL "")
5555 set (AREG_SDK_TOOLS "${AREG_SDK_ROOT} /tools" )
5656endif ()
5757
58+ if (NOT DEFINED AREG_ENABLE_OUTPUTS OR AREG_ENABLE_OUTPUTS)
59+ option (AREG_ENABLE_OUTPUTS "Enable changing output directories" TRUE )
60+ # Set the areg-sdk build root folder to output files.
61+ if (NOT DEFINED AREG_BUILD_ROOT OR "${AREG_BUILD_ROOT} " STREQUAL "" )
62+ set (AREG_BUILD_ROOT "${AREG_SDK_ROOT} /product" )
63+ endif ()
64+
65+ if (NOT DEFINED AREG_PACKAGES OR "${AREG_PACKAGES} " STREQUAL "" )
66+ set (AREG_PACKAGES "${CMAKE_BINARY_DIR} /packages" )
67+ endif ()
68+ else ()
69+ option (AREG_ENABLE_OUTPUTS "Enable changing output directories" FALSE )
70+ if (NOT DEFINED AREG_BUILD_ROOT OR "${AREG_BUILD_ROOT} " STREQUAL "" )
71+ set (AREG_BUILD_ROOT "${CMAKE_BINARY_DIR} " )
72+ endif ()
73+ endif ()
74+
5875# setup functions
5976include (${AREG_CMAKE_CONFIG_DIR} /functions.cmake )
6077# setup user configurations
6178include (${AREG_CMAKE_CONFIG_DIR} /user.cmake )
6279
80+ # CPP standard for the projects
81+ set (AREG_CXX_STANDARD 17)
82+
6383# Check whether the CMake CXX-compiler is set
6484if (NOT "${AREG_CXX_COMPILER} " STREQUAL "" )
6585 if ("${CMAKE_CXX_COMPILER} " STREQUAL "" )
@@ -80,7 +100,7 @@ if (NOT "${AREG_C_COMPILER}" STREQUAL "")
80100 endif ()
81101endif ()
82102
83- if (WIN32 )
103+ if (MSVC AND NOT " ${CMAKE_GENERATOR} " STREQUAL "Ninja" )
84104
85105 if ("${AREG_COMPILER_FAMILY} " STREQUAL "llvm" )
86106 set (CMAKE_GENERATOR_TOOLSET ClangCL CACHE INTERNAL "Force ClangCL tool-set" )
@@ -97,6 +117,11 @@ endif()
97117# check and fix CXX standard for AREG Framework sources.
98118macro_check_fix_areg_cxx_standard ()
99119
120+ # The relative path for generated files
121+ if ("${AREG_GENERATE} " STREQUAL "" )
122+ set (AREG_GENERATE "generate" )
123+ endif ()
124+
100125if (NOT "${AREG_PACKAGES} " STREQUAL "" )
101126 set (FETCHCONTENT_BASE_DIR "${AREG_PACKAGES} " CACHE PATH "Location of AREG thirdparty packages" )
102127else ()
0 commit comments