Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Core Functionality #4881

Merged
merged 12 commits into from
May 21, 2020
13 changes: 13 additions & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,15 @@ Pioneer includes the following third-party software:
Copyright (C) 2002, Lev Povalahev
Licensed under the Modified BSD licence (see licenses/GLEW.txt)

argh
Copyright (C) 2016, Adi Shavit
Licensed under the BSD 3-clause license (see licenses/BSD-3-Clause.txt)

string-view lite, a C++17-like string_view for C++98 and later.
https://github.com/martinmoene/string-view-lite
Copyright 2017-2019 by Martin Moene
Distributed under the Boost Software License, Version 1.0. (see licenses/Boost-1.0.txt)

miniz by Rich Geldreich, April 2012
Public domain (see contrib/miniz/miniz.h)

Expand Down Expand Up @@ -173,6 +182,10 @@ Pioneer includes the following third-party software:
Copyright © 2013 Tomas Kislan, Adam Rudd
Licensed under the MIT License (see contrib/base64/base64.hpp)

fmt - open-source formatting library for C++
Copyright (c) 2012 - present, Victor Zverovich
Licensed under the MIT license

High Performance C++ Profiler
https://code.google.com/p/high-performance-cplusplus-profiler/
Licensed under the MIT license
Expand Down
19 changes: 13 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,15 @@ find_package(Freetype REQUIRED)
find_package(OpenGL REQUIRED)

add_subdirectory(contrib/lz4)
add_subdirectory(contrib/fmt)

set(PIONEER_SRC ${CMAKE_SOURCE_DIR}/src)
set(PIONEER_CONTRIB ${CMAKE_SOURCE_DIR}/contrib)

include_directories(
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/contrib
${PIONEER_SRC}
${PIONEER_CONTRIB}
${PIONEER_CONTRIB}/fmt/include
${ASSIMP_INCLUDE_DIRS}
${FREETYPE_INCLUDE_DIRS}
${OPENGL_INCLUDE_DIRS}
Expand Down Expand Up @@ -281,7 +286,6 @@ add_executable(savegamedump WIN32
src/FileSystem.cpp
src/utils.cpp
src/StringF.cpp
src/GZipFormat.cpp
src/DateTime.cpp
src/Lang.cpp
${FILESYSTEM_CXX_FILES}
Expand All @@ -297,7 +301,7 @@ if (NATURALDOCS)
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})
endif()

target_link_libraries(pioneer-lib PUBLIC lz4)
target_link_libraries(pioneer-lib PUBLIC lz4 fmt::fmt)

list(APPEND pioneerLibs
pioneer-lib
Expand Down Expand Up @@ -327,7 +331,7 @@ endif (WIN32)

target_link_libraries(${PROJECT_NAME} LINK_PRIVATE ${pioneerLibs} ${winLibs})
target_link_libraries(modelcompiler LINK_PRIVATE ${pioneerLibs} ${winLibs})
target_link_libraries(savegamedump LINK_PRIVATE ${SDL2_LIBRARIES} ${SDL2_IMAGE_LIBRARIES} profiler lz4 ${winLibs})
target_link_libraries(savegamedump LINK_PRIVATE pioneer-core ${SDL2_IMAGE_LIBRARIES} ${winLibs})

set_cxx11_properties(${PROJECT_NAME} modelcompiler savegamedump)

Expand All @@ -346,15 +350,18 @@ else (CMAKE_CROSSCOMPILING)
set(MODELCOMPILER $<TARGET_FILE:modelcompiler>)
endif (CMAKE_CROSSCOMPILING)

add_custom_target(build-data)

if (MODELCOMPILER)
# Optimize the models.
# This really shouldn't be done inside the source tree...
if (NOT MSVC)
add_custom_command(TARGET modelcompiler POST_BUILD
add_custom_target(build-models
COMMAND ${CMAKE_COMMAND} -E env SDL_VIDEODRIVER=dummy ${MODELCOMPILER} -b inplace
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
COMMENT "Optimizing models" VERBATIM
)
add_dependencies(build-data build-models)
endif (NOT MSVC)
else (MODELCOMPILER)
message(WARNING "No modelcompiler provided, models won't be optimized!")
Expand Down
Loading