diff --git a/.gitignore b/.gitignore index 775e433c2..194e7ad0d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,19 @@ +# +# AzerothCore +# */compiler/config.sh +conf/* +!conf/*.dist +modules/* +!modules/dep/ build*/ + +# +#Generic +# + .directory .mailmap *.orig diff --git a/CMakeLists.txt b/CMakeLists.txt index a57662fd1..143038b0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,11 +28,6 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH 1) # set macro-directory set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/src/cmake/macros") -# build in Release-mode by default if not explicitly set -if( NOT CMAKE_BUILD_TYPE ) - set(CMAKE_BUILD_TYPE "Release") -endif() - include(CheckCXXSourceRuns) include(CheckIncludeFiles) @@ -40,7 +35,17 @@ include(CheckIncludeFiles) include(src/cmake/utils.cmake) # set default buildoptions and print them -include(src/cmake/options.cmake) +include(conf/config.cmake.dist) + +# load custom configurations for cmake if exists +if(EXISTS "conf/config.cmake") + include(conf/config.cmake) +endif() + +# build in Release-mode by default if not explicitly set +if( NOT CMAKE_BUILD_TYPE ) + set(CMAKE_BUILD_TYPE "Release") +endif() # turn off PCH totally if enabled (hidden setting, mainly for devs) if( NOPCH ) diff --git a/src/cmake/options.cmake b/conf/config.cmake.dist similarity index 64% rename from src/cmake/options.cmake rename to conf/config.cmake.dist index f8db7e908..f51b4d883 100644 --- a/src/cmake/options.cmake +++ b/conf/config.cmake.dist @@ -1,13 +1,3 @@ -# Copyright (C) -# -# This file is free software; as a special exception the author gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - option(SERVERS "Build worldserver and authserver" 1) option(SCRIPTS "Build core with scripts included" 1) option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 0)