diff --git a/.gitignore b/.gitignore index 3b1e78e..d4d4721 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ install_manifest.txt compile_commands.json CTestTestfile.cmake _deps +*.cmake* -# Output files -bin/ +# Application executable +bin/Magnetar diff --git a/CMakeLists.txt b/CMakeLists.txt index 08a6622..ca2b49e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,11 +2,16 @@ cmake_minimum_required(VERSION 2.8) project(Magnetar) set(CMAKE_CXX_STANDARD 11) -# GLFW build flags +# Directories +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake") + +include(cotire) + +# GLFW set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE) set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) - add_subdirectory(libs/glfw-3.3) find_package(OpenGL REQUIRED) @@ -42,3 +47,7 @@ add_executable(${PROJECT_NAME} ) target_link_libraries(${PROJECT_NAME} ${OPENGL_gl_LIBRARY} glfw) + +# PCH +set_target_properties(${PROJECT_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "src/magnetar_pch.h") +cotire(${PROJECT_NAME}) diff --git a/THIRD-PARTY-LICENSES.txt b/THIRD-PARTY-LICENSES.txt index eba9805..eb289f2 100644 --- a/THIRD-PARTY-LICENSES.txt +++ b/THIRD-PARTY-LICENSES.txt @@ -164,3 +164,28 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +7. cotire (CMake/cotire.cmake) + +Copyright (c) 2012-2018 Sascha Kratky + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/src/magnetar.h b/src/magnetar.h index aec7724..c47a9c0 100644 --- a/src/magnetar.h +++ b/src/magnetar.h @@ -1,7 +1,6 @@ -// Master include file, to include all Magnetar files +// Master include file, to be used by clients #include "magnetar/application.h" #include "magnetar/entry_point.h" -// Miscellaneous headers #include "magnetar/log.h" diff --git a/src/magnetar_pch.h b/src/magnetar_pch.h new file mode 100644 index 0000000..05b824e --- /dev/null +++ b/src/magnetar_pch.h @@ -0,0 +1,16 @@ +// Single pre-compiled header for use by Magnetar + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include