2021-01-02 15:06:11 +00:00
|
|
|
# Copyright (c) 2020-2021 The reone project contributors
|
2020-08-03 01:06:55 +00:00
|
|
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
2020-08-02 15:47:59 +00:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
project(reone)
|
|
|
|
|
2021-06-10 23:13:59 +00:00
|
|
|
set (CMAKE_CXX_STANDARD 14)
|
|
|
|
|
2021-05-05 01:08:12 +00:00
|
|
|
add_subdirectory(src/external/s3tc)
|
2021-01-13 09:42:21 +00:00
|
|
|
|
2020-08-03 13:16:58 +00:00
|
|
|
option(BUILD_TOOLS "build tools executable" ON)
|
2021-03-09 14:19:55 +00:00
|
|
|
option(BUILD_LAUNCHER "build launcher executable" OFF)
|
2020-10-10 08:25:36 +00:00
|
|
|
option(BUILD_TESTS "build unit tests" OFF)
|
2021-03-09 14:19:55 +00:00
|
|
|
|
2021-02-21 01:46:07 +00:00
|
|
|
option(USE_EXTERNAL_GLM "use GLM library from external subdirectory" ON)
|
2020-08-03 13:16:58 +00:00
|
|
|
|
|
|
|
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
|
|
|
find_package(Boost REQUIRED COMPONENTS filesystem program_options system)
|
|
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
find_package(GLEW REQUIRED)
|
|
|
|
find_package(MAD REQUIRED)
|
2021-03-09 14:19:55 +00:00
|
|
|
find_package(wxWidgets COMPONENTS core base)
|
2020-08-03 13:16:58 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
find_package(OpenAL CONFIG REQUIRED)
|
2020-11-12 22:26:20 +00:00
|
|
|
find_package(SDL2 CONFIG REQUIRED)
|
2021-03-08 07:45:59 +00:00
|
|
|
find_package(FFMPEG REQUIRED)
|
2020-08-03 13:16:58 +00:00
|
|
|
else()
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_check_modules(OpenAL REQUIRED openal)
|
2020-11-12 21:51:35 +00:00
|
|
|
pkg_check_modules(SDL2 REQUIRED sdl2)
|
2021-03-08 07:45:59 +00:00
|
|
|
pkg_check_modules(FFMPEG REQUIRED libavcodec libavformat libavutil libswresample libswscale)
|
2020-08-03 13:16:58 +00:00
|
|
|
find_package(Threads REQUIRED)
|
|
|
|
endif()
|
|
|
|
|
2021-05-05 01:08:12 +00:00
|
|
|
include_directories(${Boost_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS} ${MAD_INCLUDE_DIR} ${FFMPEG_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/src/external/s3tc)
|
2020-11-08 14:08:52 +00:00
|
|
|
|
2020-10-26 02:19:33 +00:00
|
|
|
if(USE_EXTERNAL_GLM)
|
2021-05-05 01:08:12 +00:00
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/src/external/glm)
|
2020-10-26 02:19:33 +00:00
|
|
|
else()
|
2020-08-03 13:16:58 +00:00
|
|
|
find_package(glm REQUIRED)
|
|
|
|
endif()
|
|
|
|
|
2021-03-11 07:59:18 +00:00
|
|
|
add_compile_definitions(BOOST_BIND_GLOBAL_PLACEHOLDERS)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
|
|
|
endif()
|
2020-10-26 02:19:33 +00:00
|
|
|
|
2020-11-10 06:44:48 +00:00
|
|
|
## libcommon static library
|
|
|
|
|
|
|
|
set(COMMON_HEADERS
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/common/cache.h
|
|
|
|
src/engine/common/collectionutil.h
|
2021-05-20 14:07:35 +00:00
|
|
|
src/engine/common/guardutil.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/common/log.h
|
|
|
|
src/engine/common/mediastream.h
|
|
|
|
src/engine/common/pathutil.h
|
2021-06-10 17:39:34 +00:00
|
|
|
src/engine/common/pch.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/common/random.h
|
|
|
|
src/engine/common/stopwatch.h
|
|
|
|
src/engine/common/streamreader.h
|
|
|
|
src/engine/common/streamutil.h
|
|
|
|
src/engine/common/streamwriter.h
|
|
|
|
src/engine/common/timer.h
|
|
|
|
src/engine/common/types.h)
|
2020-11-10 06:44:48 +00:00
|
|
|
|
|
|
|
set(COMMON_SOURCES
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/common/log.cpp
|
|
|
|
src/engine/common/pathutil.cpp
|
|
|
|
src/engine/common/random.cpp
|
|
|
|
src/engine/common/stopwatch.cpp
|
|
|
|
src/engine/common/streamreader.cpp
|
|
|
|
src/engine/common/streamutil.cpp
|
|
|
|
src/engine/common/streamwriter.cpp
|
|
|
|
src/engine/common/timer.cpp)
|
2020-11-10 06:44:48 +00:00
|
|
|
|
|
|
|
add_library(libcommon STATIC ${COMMON_HEADERS} ${COMMON_SOURCES})
|
|
|
|
set_target_properties(libcommon PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
2021-06-10 17:39:34 +00:00
|
|
|
target_precompile_headers(libcommon PRIVATE src/engine/common/pch.h)
|
2020-11-10 06:44:48 +00:00
|
|
|
|
|
|
|
## END libcommon static library
|
2020-10-11 04:02:29 +00:00
|
|
|
|
2020-10-26 02:19:33 +00:00
|
|
|
## libresource static library
|
|
|
|
|
|
|
|
set(RESOURCE_HEADERS
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/resource/2da.h
|
|
|
|
src/engine/resource/gffstruct.h
|
|
|
|
src/engine/resource/folder.h
|
|
|
|
src/engine/resource/format/2dareader.h
|
|
|
|
src/engine/resource/format/2dawriter.h
|
|
|
|
src/engine/resource/format/bifreader.h
|
|
|
|
src/engine/resource/format/binreader.h
|
|
|
|
src/engine/resource/format/erfreader.h
|
|
|
|
src/engine/resource/format/erfwriter.h
|
|
|
|
src/engine/resource/format/gffreader.h
|
|
|
|
src/engine/resource/format/gffwriter.h
|
|
|
|
src/engine/resource/format/keyreader.h
|
|
|
|
src/engine/resource/format/ltrreader.h
|
|
|
|
src/engine/resource/format/lytreader.h
|
|
|
|
src/engine/resource/format/pereader.h
|
|
|
|
src/engine/resource/format/rimreader.h
|
|
|
|
src/engine/resource/format/rimwriter.h
|
|
|
|
src/engine/resource/format/ssfreader.h
|
|
|
|
src/engine/resource/format/tlkreader.h
|
|
|
|
src/engine/resource/format/tlkwriter.h
|
|
|
|
src/engine/resource/format/visreader.h
|
|
|
|
src/engine/resource/keybifprovider.h
|
2021-06-10 17:39:34 +00:00
|
|
|
src/engine/resource/pch.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/resource/resourceprovider.h
|
|
|
|
src/engine/resource/resources.h
|
2021-05-21 05:12:57 +00:00
|
|
|
src/engine/resource/services.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/resource/strings.h
|
|
|
|
src/engine/resource/talktable.h
|
|
|
|
src/engine/resource/types.h
|
|
|
|
src/engine/resource/typeutil.h)
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
set(RESOURCE_SOURCES
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/resource/2da.cpp
|
|
|
|
src/engine/resource/gffstruct.cpp
|
2021-06-04 19:50:21 +00:00
|
|
|
src/engine/resource/gffstruct_field.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/resource/folder.cpp
|
|
|
|
src/engine/resource/format/2dareader.cpp
|
|
|
|
src/engine/resource/format/2dawriter.cpp
|
|
|
|
src/engine/resource/format/bifreader.cpp
|
|
|
|
src/engine/resource/format/binreader.cpp
|
|
|
|
src/engine/resource/format/erfreader.cpp
|
|
|
|
src/engine/resource/format/erfwriter.cpp
|
|
|
|
src/engine/resource/format/gffreader.cpp
|
|
|
|
src/engine/resource/format/gffwriter.cpp
|
|
|
|
src/engine/resource/format/keyreader.cpp
|
|
|
|
src/engine/resource/format/ltrreader.cpp
|
|
|
|
src/engine/resource/format/lytreader.cpp
|
|
|
|
src/engine/resource/format/pereader.cpp
|
|
|
|
src/engine/resource/format/rimreader.cpp
|
|
|
|
src/engine/resource/format/rimwriter.cpp
|
|
|
|
src/engine/resource/format/ssfreader.cpp
|
|
|
|
src/engine/resource/format/tlkreader.cpp
|
|
|
|
src/engine/resource/format/tlkwriter.cpp
|
|
|
|
src/engine/resource/format/visreader.cpp
|
|
|
|
src/engine/resource/keybifprovider.cpp
|
|
|
|
src/engine/resource/resources.cpp
|
2021-05-22 04:17:37 +00:00
|
|
|
src/engine/resource/services.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/resource/strings.cpp
|
|
|
|
src/engine/resource/talktable.cpp
|
|
|
|
src/engine/resource/typeutil.cpp)
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
add_library(libresource STATIC ${RESOURCE_HEADERS} ${RESOURCE_SOURCES})
|
|
|
|
set_target_properties(libresource PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
2021-06-10 17:39:34 +00:00
|
|
|
target_precompile_headers(libresource PRIVATE src/engine/resource/pch.h)
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
## END libresource static library
|
|
|
|
|
2021-05-04 17:24:53 +00:00
|
|
|
## libgraphics static library
|
|
|
|
|
|
|
|
set(GRAPHICS_HEADERS
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/aabb.h
|
2021-05-12 01:06:13 +00:00
|
|
|
src/engine/graphics/baryutil.h
|
2021-05-18 01:33:25 +00:00
|
|
|
src/engine/graphics/beziercurve.h
|
2021-05-22 06:24:42 +00:00
|
|
|
src/engine/graphics/context.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/cursor.h
|
2021-05-20 13:26:54 +00:00
|
|
|
src/engine/graphics/eventhandler.h
|
2021-05-22 06:47:43 +00:00
|
|
|
src/engine/graphics/features.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/font.h
|
|
|
|
src/engine/graphics/fonts.h
|
|
|
|
src/engine/graphics/framebuffer.h
|
2021-05-14 16:31:05 +00:00
|
|
|
src/engine/graphics/lip/animation.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/lip/lipreader.h
|
|
|
|
src/engine/graphics/lip/lips.h
|
|
|
|
src/engine/graphics/lip/lipwriter.h
|
|
|
|
src/engine/graphics/material.h
|
|
|
|
src/engine/graphics/materials.h
|
2021-05-11 16:05:34 +00:00
|
|
|
src/engine/graphics/mesh/mesh.h
|
|
|
|
src/engine/graphics/mesh/meshes.h
|
|
|
|
src/engine/graphics/mesh/vertexattributes.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/model/animatedproperty.h
|
|
|
|
src/engine/graphics/model/animation.h
|
|
|
|
src/engine/graphics/model/mdlreader.h
|
|
|
|
src/engine/graphics/model/model.h
|
|
|
|
src/engine/graphics/model/modelnode.h
|
|
|
|
src/engine/graphics/model/models.h
|
2021-05-20 13:26:54 +00:00
|
|
|
src/engine/graphics/options.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/pbribl.h
|
|
|
|
src/engine/graphics/pixelutil.h
|
|
|
|
src/engine/graphics/renderbuffer.h
|
2021-05-21 05:12:57 +00:00
|
|
|
src/engine/graphics/services.h
|
2021-05-07 11:55:17 +00:00
|
|
|
src/engine/graphics/shader/shaders.h
|
2021-05-11 16:05:34 +00:00
|
|
|
src/engine/graphics/texture/curreader.h
|
|
|
|
src/engine/graphics/texture/texture.h
|
|
|
|
src/engine/graphics/texture/textures.h
|
|
|
|
src/engine/graphics/texture/textureutil.h
|
|
|
|
src/engine/graphics/texture/tgareader.h
|
|
|
|
src/engine/graphics/texture/tgawriter.h
|
|
|
|
src/engine/graphics/texture/tpcreader.h
|
|
|
|
src/engine/graphics/texture/txireader.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/textutil.h
|
|
|
|
src/engine/graphics/types.h
|
|
|
|
src/engine/graphics/walkmesh/bwmreader.h
|
|
|
|
src/engine/graphics/walkmesh/walkmesh.h
|
|
|
|
src/engine/graphics/walkmesh/walkmeshes.h
|
|
|
|
src/engine/graphics/window.h)
|
2021-05-04 17:24:53 +00:00
|
|
|
|
|
|
|
set(GRAPHICS_SOURCES
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/aabb.cpp
|
2021-05-22 06:24:42 +00:00
|
|
|
src/engine/graphics/context.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/cursor.cpp
|
2021-05-22 06:47:43 +00:00
|
|
|
src/engine/graphics/features.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/font.cpp
|
|
|
|
src/engine/graphics/fonts.cpp
|
|
|
|
src/engine/graphics/framebuffer.cpp
|
2021-05-14 16:31:05 +00:00
|
|
|
src/engine/graphics/lip/animation.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/lip/lipreader.cpp
|
|
|
|
src/engine/graphics/lip/lips.cpp
|
|
|
|
src/engine/graphics/lip/lipwriter.cpp
|
|
|
|
src/engine/graphics/materials.cpp
|
2021-05-11 16:05:34 +00:00
|
|
|
src/engine/graphics/mesh/mesh.cpp
|
|
|
|
src/engine/graphics/mesh/meshes.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/model/animation.cpp
|
|
|
|
src/engine/graphics/model/mdlreader.cpp
|
2021-05-13 07:42:29 +00:00
|
|
|
src/engine/graphics/model/mdlreader_controllers.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/model/model.cpp
|
|
|
|
src/engine/graphics/model/modelnode.cpp
|
|
|
|
src/engine/graphics/model/models.cpp
|
|
|
|
src/engine/graphics/pbribl.cpp
|
|
|
|
src/engine/graphics/pixelutil.cpp
|
|
|
|
src/engine/graphics/renderbuffer.cpp
|
2021-05-22 04:17:37 +00:00
|
|
|
src/engine/graphics/services.cpp
|
2021-05-07 11:55:17 +00:00
|
|
|
src/engine/graphics/shader/shaders.cpp
|
|
|
|
src/engine/graphics/shader/shaders_common.cpp
|
|
|
|
src/engine/graphics/shader/shaders_pbr.cpp
|
|
|
|
src/engine/graphics/shader/shaders_phong.cpp
|
2021-05-11 16:05:34 +00:00
|
|
|
src/engine/graphics/texture/curreader.cpp
|
|
|
|
src/engine/graphics/texture/texture.cpp
|
|
|
|
src/engine/graphics/texture/textures.cpp
|
|
|
|
src/engine/graphics/texture/textureutil.cpp
|
|
|
|
src/engine/graphics/texture/tgareader.cpp
|
|
|
|
src/engine/graphics/texture/tgawriter.cpp
|
|
|
|
src/engine/graphics/texture/tpcreader.cpp
|
|
|
|
src/engine/graphics/texture/txireader.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/graphics/textutil.cpp
|
|
|
|
src/engine/graphics/walkmesh/bwmreader.cpp
|
|
|
|
src/engine/graphics/walkmesh/walkmesh.cpp
|
|
|
|
src/engine/graphics/walkmesh/walkmeshes.cpp
|
|
|
|
src/engine/graphics/window.cpp)
|
2021-05-04 17:24:53 +00:00
|
|
|
|
|
|
|
add_library(libgraphics STATIC ${GRAPHICS_HEADERS} ${GRAPHICS_SOURCES})
|
|
|
|
set_target_properties(libgraphics PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
|
|
|
|
## END libgraphics static library
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
## libaudio static library
|
|
|
|
|
|
|
|
set(AUDIO_HEADERS
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/audio/files.h
|
|
|
|
src/engine/audio/format/mp3reader.h
|
|
|
|
src/engine/audio/format/wavreader.h
|
2021-05-20 13:26:54 +00:00
|
|
|
src/engine/audio/options.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/audio/player.h
|
2021-05-21 05:12:57 +00:00
|
|
|
src/engine/audio/services.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/audio/soundhandle.h
|
|
|
|
src/engine/audio/soundinstance.h
|
|
|
|
src/engine/audio/stream.h
|
|
|
|
src/engine/audio/types.h)
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
set(AUDIO_SOURCES
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/audio/files.cpp
|
|
|
|
src/engine/audio/format/mp3reader.cpp
|
|
|
|
src/engine/audio/format/wavreader.cpp
|
|
|
|
src/engine/audio/player.cpp
|
2021-05-22 04:17:37 +00:00
|
|
|
src/engine/audio/services.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/audio/soundhandle.cpp
|
|
|
|
src/engine/audio/soundinstance.cpp
|
|
|
|
src/engine/audio/stream.cpp)
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
add_library(libaudio STATIC ${AUDIO_HEADERS} ${AUDIO_SOURCES})
|
|
|
|
set_target_properties(libaudio PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
|
|
|
|
## END libaudio static library
|
|
|
|
|
2020-10-28 01:28:00 +00:00
|
|
|
## libvideo static library
|
|
|
|
|
|
|
|
set(VIDEO_HEADERS
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/video/bikreader.h
|
|
|
|
src/engine/video/video.h)
|
2020-10-28 01:28:00 +00:00
|
|
|
|
|
|
|
set(VIDEO_SOURCES
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/video/bikreader.cpp
|
|
|
|
src/engine/video/video.cpp)
|
2020-10-28 01:28:00 +00:00
|
|
|
|
|
|
|
add_library(libvideo STATIC ${VIDEO_HEADERS} ${VIDEO_SOURCES})
|
|
|
|
set_target_properties(libvideo PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
|
|
|
|
## END libvideo static library
|
|
|
|
|
2020-10-26 02:19:33 +00:00
|
|
|
## libscene static library
|
|
|
|
|
|
|
|
set(SCENE_HEADERS
|
2021-05-14 16:31:05 +00:00
|
|
|
src/engine/scene/animeventlistener.h
|
|
|
|
src/engine/scene/animproperties.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/scene/node/cameranode.h
|
2021-05-14 16:31:05 +00:00
|
|
|
src/engine/scene/node/dummynode.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/scene/node/emitternode.h
|
|
|
|
src/engine/scene/node/grassnode.h
|
|
|
|
src/engine/scene/node/lightnode.h
|
|
|
|
src/engine/scene/node/meshnode.h
|
2021-05-13 08:16:49 +00:00
|
|
|
src/engine/scene/node/modelnode.h
|
2021-05-14 16:31:05 +00:00
|
|
|
src/engine/scene/node/modelnodescenenode.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/scene/node/scenenode.h
|
2021-05-19 05:42:26 +00:00
|
|
|
src/engine/scene/nodeelement.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/scene/pipeline/control.h
|
|
|
|
src/engine/scene/pipeline/world.h
|
2021-05-21 05:12:57 +00:00
|
|
|
src/engine/scene/services.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/scene/scenegraph.h
|
|
|
|
src/engine/scene/types.h)
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
set(SCENE_SOURCES
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/scene/node/cameranode.cpp
|
|
|
|
src/engine/scene/node/emitternode.cpp
|
|
|
|
src/engine/scene/node/grassnode.cpp
|
|
|
|
src/engine/scene/node/lightnode.cpp
|
|
|
|
src/engine/scene/node/meshnode.cpp
|
2021-05-13 08:16:49 +00:00
|
|
|
src/engine/scene/node/modelnode.cpp
|
2021-05-14 16:31:05 +00:00
|
|
|
src/engine/scene/node/modelnode_animation.cpp
|
|
|
|
src/engine/scene/node/modelnodescenenode.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/scene/node/scenenode.cpp
|
|
|
|
src/engine/scene/pipeline/control.cpp
|
|
|
|
src/engine/scene/pipeline/world.cpp
|
2021-05-22 04:17:37 +00:00
|
|
|
src/engine/scene/services.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/scene/scenegraph.cpp)
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
add_library(libscene STATIC ${SCENE_HEADERS} ${SCENE_SOURCES})
|
|
|
|
set_target_properties(libscene PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
|
|
|
|
## END libscene static library
|
|
|
|
|
|
|
|
## libgui static library
|
|
|
|
|
|
|
|
set(GUI_HEADERS
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/gui/control/button.h
|
|
|
|
src/engine/gui/control/control.h
|
|
|
|
src/engine/gui/control/imagebutton.h
|
|
|
|
src/engine/gui/control/label.h
|
|
|
|
src/engine/gui/control/listbox.h
|
|
|
|
src/engine/gui/control/panel.h
|
|
|
|
src/engine/gui/control/progressbar.h
|
|
|
|
src/engine/gui/control/scrollbar.h
|
2021-06-08 00:40:35 +00:00
|
|
|
src/engine/gui/control/slider.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/gui/control/togglebutton.h
|
|
|
|
src/engine/gui/gui.h
|
|
|
|
src/engine/gui/scenebuilder.h
|
|
|
|
src/engine/gui/textinput.h
|
|
|
|
src/engine/gui/types.h)
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
set(GUI_SOURCES
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/gui/control/button.cpp
|
|
|
|
src/engine/gui/control/control.cpp
|
|
|
|
src/engine/gui/control/imagebutton.cpp
|
|
|
|
src/engine/gui/control/label.cpp
|
|
|
|
src/engine/gui/control/listbox.cpp
|
|
|
|
src/engine/gui/control/panel.cpp
|
|
|
|
src/engine/gui/control/progressbar.cpp
|
2021-06-08 00:40:35 +00:00
|
|
|
src/engine/gui/control/slider.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/gui/control/scrollbar.cpp
|
|
|
|
src/engine/gui/control/togglebutton.cpp
|
|
|
|
src/engine/gui/gui.cpp
|
|
|
|
src/engine/gui/scenebuilder.cpp
|
|
|
|
src/engine/gui/textinput.cpp)
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
add_library(libgui STATIC ${GUI_HEADERS} ${GUI_SOURCES})
|
|
|
|
set_target_properties(libgui PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
|
|
|
|
## END libgui static library
|
|
|
|
|
|
|
|
## libscript static library
|
|
|
|
|
|
|
|
set(SCRIPT_HEADERS
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/script/enginetype.h
|
|
|
|
src/engine/script/execution.h
|
|
|
|
src/engine/script/instrutil.h
|
|
|
|
src/engine/script/ncsreader.h
|
|
|
|
src/engine/script/program.h
|
|
|
|
src/engine/script/routine.h
|
2021-05-22 04:17:37 +00:00
|
|
|
src/engine/script/services.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/script/scripts.h
|
|
|
|
src/engine/script/types.h
|
|
|
|
src/engine/script/variable.h)
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
set(SCRIPT_SOURCES
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/script/execution.cpp
|
|
|
|
src/engine/script/instrutil.cpp
|
|
|
|
src/engine/script/ncsreader.cpp
|
|
|
|
src/engine/script/program.cpp
|
|
|
|
src/engine/script/routine.cpp
|
2021-05-22 04:17:37 +00:00
|
|
|
src/engine/script/services.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/script/scripts.cpp
|
|
|
|
src/engine/script/variable.cpp)
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
add_library(libscript STATIC ${SCRIPT_HEADERS} ${SCRIPT_SOURCES})
|
|
|
|
set_target_properties(libscript PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
|
|
|
|
|
|
|
## END libscript static library
|
|
|
|
|
2020-10-11 04:02:29 +00:00
|
|
|
## libgame static library
|
|
|
|
|
|
|
|
set(GAME_HEADERS
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/action/action.h
|
|
|
|
src/engine/game/action/commandaction.h
|
|
|
|
src/engine/game/action/follow.h
|
|
|
|
src/engine/game/action/locationaction.h
|
|
|
|
src/engine/game/action/movetolocation.h
|
|
|
|
src/engine/game/action/movetoobject.h
|
|
|
|
src/engine/game/action/movetopoint.h
|
|
|
|
src/engine/game/action/objectaction.h
|
|
|
|
src/engine/game/action/playanimation.h
|
|
|
|
src/engine/game/action/startconversation.h
|
2021-05-26 16:16:40 +00:00
|
|
|
src/engine/game/action/usefeat.h
|
|
|
|
src/engine/game/action/useskill.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/action/waitaction.h
|
|
|
|
src/engine/game/animationutil.h
|
|
|
|
src/engine/game/camera/animatedcamera.h
|
|
|
|
src/engine/game/camera/camera.h
|
|
|
|
src/engine/game/camera/camerastyle.h
|
|
|
|
src/engine/game/camera/dialogcamera.h
|
|
|
|
src/engine/game/camera/firstperson.h
|
|
|
|
src/engine/game/camera/staticcamera.h
|
|
|
|
src/engine/game/camera/thirdperson.h
|
|
|
|
src/engine/game/character.h
|
|
|
|
src/engine/game/console.h
|
2021-05-26 16:16:40 +00:00
|
|
|
src/engine/game/contextaction.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/combat/combat.h
|
|
|
|
src/engine/game/cursors.h
|
2021-05-21 05:12:57 +00:00
|
|
|
src/engine/game/d20/attributes.h
|
|
|
|
src/engine/game/d20/class.h
|
|
|
|
src/engine/game/d20/classes.h
|
|
|
|
src/engine/game/d20/feat.h
|
|
|
|
src/engine/game/d20/feats.h
|
|
|
|
src/engine/game/d20/savingthrows.h
|
2021-05-27 00:20:46 +00:00
|
|
|
src/engine/game/d20/skill.h
|
|
|
|
src/engine/game/d20/skills.h
|
2021-05-21 05:12:57 +00:00
|
|
|
src/engine/game/d20/spell.h
|
|
|
|
src/engine/game/d20/spells.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/dialog.h
|
|
|
|
src/engine/game/enginetype/effect.h
|
|
|
|
src/engine/game/enginetype/event.h
|
|
|
|
src/engine/game/enginetype/location.h
|
|
|
|
src/engine/game/enginetype/talent.h
|
|
|
|
src/engine/game/footstepsounds.h
|
|
|
|
src/engine/game/game.h
|
|
|
|
src/engine/game/gameidutil.h
|
|
|
|
src/engine/game/gui/barkbubble.h
|
|
|
|
src/engine/game/gui/chargen/abilities.h
|
|
|
|
src/engine/game/gui/chargen/chargen.h
|
|
|
|
src/engine/game/gui/chargen/classselect.h
|
|
|
|
src/engine/game/gui/chargen/custom.h
|
|
|
|
src/engine/game/gui/chargen/feats.h
|
|
|
|
src/engine/game/gui/chargen/levelup.h
|
|
|
|
src/engine/game/gui/chargen/nameentry.h
|
|
|
|
src/engine/game/gui/chargen/portraitselect.h
|
|
|
|
src/engine/game/gui/chargen/quick.h
|
|
|
|
src/engine/game/gui/chargen/quickorcustom.h
|
|
|
|
src/engine/game/gui/chargen/skills.h
|
|
|
|
src/engine/game/gui/colorutil.h
|
|
|
|
src/engine/game/gui/container.h
|
|
|
|
src/engine/game/gui/conversation.h
|
|
|
|
src/engine/game/gui/computer.h
|
|
|
|
src/engine/game/gui/dialog.h
|
|
|
|
src/engine/game/gui/gui.h
|
|
|
|
src/engine/game/gui/hud.h
|
|
|
|
src/engine/game/gui/ingame/abilities.h
|
|
|
|
src/engine/game/gui/ingame/character.h
|
|
|
|
src/engine/game/gui/ingame/equip.h
|
|
|
|
src/engine/game/gui/ingame/ingame.h
|
|
|
|
src/engine/game/gui/ingame/inventory.h
|
|
|
|
src/engine/game/gui/ingame/journal.h
|
|
|
|
src/engine/game/gui/ingame/map.h
|
|
|
|
src/engine/game/gui/ingame/messages.h
|
|
|
|
src/engine/game/gui/ingame/options.h
|
|
|
|
src/engine/game/gui/loadscreen.h
|
|
|
|
src/engine/game/gui/mainmenu.h
|
|
|
|
src/engine/game/gui/partyselect.h
|
|
|
|
src/engine/game/gui/profileoverlay.h
|
|
|
|
src/engine/game/gui/saveload.h
|
|
|
|
src/engine/game/gui/selectoverlay.h
|
|
|
|
src/engine/game/gui/sounds.h
|
|
|
|
src/engine/game/map.h
|
|
|
|
src/engine/game/object/area.h
|
|
|
|
src/engine/game/object/creature.h
|
|
|
|
src/engine/game/object/door.h
|
|
|
|
src/engine/game/object/encounter.h
|
|
|
|
src/engine/game/object/item.h
|
|
|
|
src/engine/game/object/module.h
|
|
|
|
src/engine/game/object/object.h
|
|
|
|
src/engine/game/object/objectfactory.h
|
|
|
|
src/engine/game/object/placeable.h
|
|
|
|
src/engine/game/object/placeablecamera.h
|
|
|
|
src/engine/game/object/sound.h
|
|
|
|
src/engine/game/object/spatial.h
|
|
|
|
src/engine/game/object/trigger.h
|
|
|
|
src/engine/game/object/waypoint.h
|
|
|
|
src/engine/game/objectconverter.h
|
|
|
|
src/engine/game/options.h
|
|
|
|
src/engine/game/party.h
|
|
|
|
src/engine/game/path.h
|
|
|
|
src/engine/game/pathfinder.h
|
|
|
|
src/engine/game/player.h
|
|
|
|
src/engine/game/portrait.h
|
|
|
|
src/engine/game/portraits.h
|
|
|
|
src/engine/game/reputes.h
|
|
|
|
src/engine/game/room.h
|
|
|
|
src/engine/game/savedgame.h
|
2021-05-21 05:12:57 +00:00
|
|
|
src/engine/game/services.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/script/objectutil.h
|
|
|
|
src/engine/game/script/routines.h
|
2021-05-19 08:59:41 +00:00
|
|
|
src/engine/game/script/runner.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/soundsets.h
|
|
|
|
src/engine/game/surface.h
|
|
|
|
src/engine/game/surfaces.h
|
|
|
|
src/engine/game/types.h)
|
2020-10-11 04:02:29 +00:00
|
|
|
|
|
|
|
set(GAME_SOURCES
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/actionexecutor.cpp
|
|
|
|
src/engine/game/animationutil.cpp
|
|
|
|
src/engine/game/camera/animatedcamera.cpp
|
|
|
|
src/engine/game/camera/camera.cpp
|
|
|
|
src/engine/game/camera/camerastyle.cpp
|
|
|
|
src/engine/game/camera/dialogcamera.cpp
|
|
|
|
src/engine/game/camera/firstperson.cpp
|
|
|
|
src/engine/game/camera/staticcamera.cpp
|
|
|
|
src/engine/game/camera/thirdperson.cpp
|
|
|
|
src/engine/game/combat/combat.cpp
|
|
|
|
src/engine/game/combat/combat_attack.cpp
|
|
|
|
src/engine/game/combat/combat_damage.cpp
|
|
|
|
src/engine/game/combat/combat_projectiles.cpp
|
|
|
|
src/engine/game/console.cpp
|
|
|
|
src/engine/game/cursors.cpp
|
|
|
|
src/engine/game/d20/attributes.cpp
|
2021-05-18 04:13:32 +00:00
|
|
|
src/engine/game/d20/attributes_abilities.cpp
|
|
|
|
src/engine/game/d20/attributes_classes.cpp
|
|
|
|
src/engine/game/d20/attributes_skills.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/d20/class.cpp
|
|
|
|
src/engine/game/d20/classes.cpp
|
2021-05-19 03:10:55 +00:00
|
|
|
src/engine/game/d20/feats.cpp
|
2021-05-27 00:20:46 +00:00
|
|
|
src/engine/game/d20/skills.cpp
|
2021-05-19 05:06:27 +00:00
|
|
|
src/engine/game/d20/spells.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/dialog.cpp
|
|
|
|
src/engine/game/footstepsounds.cpp
|
|
|
|
src/engine/game/game.cpp
|
|
|
|
src/engine/game/game_kotor.cpp
|
|
|
|
src/engine/game/game_save.cpp
|
|
|
|
src/engine/game/game_tsl.cpp
|
|
|
|
src/engine/game/gameidutil.cpp
|
|
|
|
src/engine/game/gui/barkbubble.cpp
|
|
|
|
src/engine/game/gui/chargen/abilities.cpp
|
|
|
|
src/engine/game/gui/chargen/chargen.cpp
|
|
|
|
src/engine/game/gui/chargen/classselect.cpp
|
|
|
|
src/engine/game/gui/chargen/custom.cpp
|
|
|
|
src/engine/game/gui/chargen/feats.cpp
|
|
|
|
src/engine/game/gui/chargen/levelup.cpp
|
|
|
|
src/engine/game/gui/chargen/nameentry.cpp
|
|
|
|
src/engine/game/gui/chargen/portraitselect.cpp
|
|
|
|
src/engine/game/gui/chargen/quick.cpp
|
|
|
|
src/engine/game/gui/chargen/quickorcustom.cpp
|
|
|
|
src/engine/game/gui/chargen/skills.cpp
|
|
|
|
src/engine/game/gui/colorutil.cpp
|
|
|
|
src/engine/game/gui/computer.cpp
|
|
|
|
src/engine/game/gui/container.cpp
|
|
|
|
src/engine/game/gui/conversation.cpp
|
|
|
|
src/engine/game/gui/dialog.cpp
|
|
|
|
src/engine/game/gui/gui.cpp
|
|
|
|
src/engine/game/gui/hud.cpp
|
|
|
|
src/engine/game/gui/ingame/abilities.cpp
|
|
|
|
src/engine/game/gui/ingame/character.cpp
|
|
|
|
src/engine/game/gui/ingame/equip.cpp
|
|
|
|
src/engine/game/gui/ingame/ingame.cpp
|
|
|
|
src/engine/game/gui/ingame/inventory.cpp
|
|
|
|
src/engine/game/gui/ingame/journal.cpp
|
|
|
|
src/engine/game/gui/ingame/map.cpp
|
|
|
|
src/engine/game/gui/ingame/messages.cpp
|
|
|
|
src/engine/game/gui/ingame/options.cpp
|
|
|
|
src/engine/game/gui/loadscreen.cpp
|
|
|
|
src/engine/game/gui/mainmenu.cpp
|
|
|
|
src/engine/game/gui/partyselect.cpp
|
|
|
|
src/engine/game/gui/profileoverlay.cpp
|
|
|
|
src/engine/game/gui/saveload.cpp
|
|
|
|
src/engine/game/gui/selectoverlay.cpp
|
|
|
|
src/engine/game/gui/sounds.cpp
|
|
|
|
src/engine/game/map.cpp
|
|
|
|
src/engine/game/object/area.cpp
|
|
|
|
src/engine/game/object/area_are.cpp
|
2021-05-10 14:57:21 +00:00
|
|
|
src/engine/game/object/area_collision.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/object/area_git.cpp
|
2021-05-18 04:44:51 +00:00
|
|
|
src/engine/game/object/area_perception.cpp
|
|
|
|
src/engine/game/object/area_search.cpp
|
|
|
|
src/engine/game/object/area_selection.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/object/creature.cpp
|
|
|
|
src/engine/game/object/creature_animations.cpp
|
|
|
|
src/engine/game/object/creature_appearance.cpp
|
|
|
|
src/engine/game/object/creature_blueprint.cpp
|
|
|
|
src/engine/game/object/door.cpp
|
|
|
|
src/engine/game/object/door_blueprint.cpp
|
|
|
|
src/engine/game/object/encounter.cpp
|
|
|
|
src/engine/game/object/encounter_blueprint.cpp
|
|
|
|
src/engine/game/object/item.cpp
|
|
|
|
src/engine/game/object/item_blueprint.cpp
|
|
|
|
src/engine/game/object/module.cpp
|
|
|
|
src/engine/game/object/object.cpp
|
2021-05-18 05:14:31 +00:00
|
|
|
src/engine/game/object/object_actions.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/object/objectfactory.cpp
|
|
|
|
src/engine/game/object/placeable.cpp
|
|
|
|
src/engine/game/object/placeable_blueprint.cpp
|
|
|
|
src/engine/game/object/placeablecamera.cpp
|
|
|
|
src/engine/game/object/sound.cpp
|
|
|
|
src/engine/game/object/sound_blueprint.cpp
|
|
|
|
src/engine/game/object/spatial.cpp
|
|
|
|
src/engine/game/object/trigger.cpp
|
|
|
|
src/engine/game/object/trigger_blueprint.cpp
|
|
|
|
src/engine/game/object/waypoint.cpp
|
|
|
|
src/engine/game/object/waypoint_blueprint.cpp
|
|
|
|
src/engine/game/party.cpp
|
|
|
|
src/engine/game/path.cpp
|
|
|
|
src/engine/game/pathfinder.cpp
|
|
|
|
src/engine/game/player.cpp
|
|
|
|
src/engine/game/portraits.cpp
|
|
|
|
src/engine/game/reputes.cpp
|
|
|
|
src/engine/game/room.cpp
|
2021-05-22 04:17:37 +00:00
|
|
|
src/engine/game/services.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/script/routines.cpp
|
|
|
|
src/engine/game/script/routines_actions.cpp
|
|
|
|
src/engine/game/script/routines_combat.cpp
|
|
|
|
src/engine/game/script/routines_common.cpp
|
|
|
|
src/engine/game/script/routines_d20.cpp
|
|
|
|
src/engine/game/script/routines_effects.cpp
|
|
|
|
src/engine/game/script/routines_events.cpp
|
|
|
|
src/engine/game/script/routines_faction.cpp
|
|
|
|
src/engine/game/script/routines_items.cpp
|
|
|
|
src/engine/game/script/routines_kotor.cpp
|
|
|
|
src/engine/game/script/routines_locations.cpp
|
|
|
|
src/engine/game/script/routines_math.cpp
|
|
|
|
src/engine/game/script/routines_objects.cpp
|
|
|
|
src/engine/game/script/routines_party.cpp
|
|
|
|
src/engine/game/script/routines_perception.cpp
|
2021-06-06 06:22:37 +00:00
|
|
|
src/engine/game/script/routines_placeholders.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/script/routines_stealth.cpp
|
|
|
|
src/engine/game/script/routines_strings.cpp
|
|
|
|
src/engine/game/script/routines_time.cpp
|
|
|
|
src/engine/game/script/routines_tsl.cpp
|
|
|
|
src/engine/game/script/routines_vars.cpp
|
2021-05-19 08:59:41 +00:00
|
|
|
src/engine/game/script/runner.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/game/soundsets.cpp
|
|
|
|
src/engine/game/surfaces.cpp)
|
2020-10-11 04:02:29 +00:00
|
|
|
|
|
|
|
add_library(libgame STATIC ${GAME_HEADERS} ${GAME_SOURCES})
|
2020-10-11 05:55:10 +00:00
|
|
|
set_target_properties(libgame PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
2020-10-11 04:02:29 +00:00
|
|
|
|
|
|
|
## END libgame static library
|
|
|
|
|
|
|
|
## reone executable
|
|
|
|
|
2020-10-11 04:53:17 +00:00
|
|
|
set(REONE_HEADERS
|
2021-05-22 04:17:37 +00:00
|
|
|
src/engine/engine.h
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/program.h)
|
2020-10-11 04:53:17 +00:00
|
|
|
|
|
|
|
set(REONE_SOURCES
|
2021-05-22 04:17:37 +00:00
|
|
|
src/engine/engine.cpp
|
2021-05-05 01:08:12 +00:00
|
|
|
src/engine/main.cpp
|
|
|
|
src/engine/program.cpp)
|
2020-10-11 04:53:17 +00:00
|
|
|
|
2020-11-01 16:46:36 +00:00
|
|
|
if(WIN32)
|
|
|
|
list(APPEND REONE_SOURCES res/reone.rc)
|
|
|
|
endif()
|
|
|
|
|
2020-10-11 04:53:17 +00:00
|
|
|
add_executable(reone ${REONE_HEADERS} ${REONE_SOURCES})
|
2020-10-11 05:55:10 +00:00
|
|
|
set_target_properties(reone PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
target_link_libraries(reone PRIVATE
|
2021-05-04 17:24:53 +00:00
|
|
|
libgame libscript libgui libscene libvideo libaudio libgraphics libresource libcommon
|
2021-01-13 12:59:15 +00:00
|
|
|
libs3tc
|
2020-10-26 02:19:33 +00:00
|
|
|
${Boost_FILESYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_SYSTEM_LIBRARY}
|
|
|
|
GLEW::GLEW
|
|
|
|
${OPENGL_LIBRARIES}
|
2021-03-08 07:45:59 +00:00
|
|
|
${MAD_LIBRARY}
|
|
|
|
${FFMPEG_LIBRARIES})
|
2020-11-08 14:08:52 +00:00
|
|
|
|
2020-10-26 02:19:33 +00:00
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(reone PRIVATE SDL2::SDL2 OpenAL::OpenAL)
|
|
|
|
else()
|
2020-11-15 12:58:05 +00:00
|
|
|
target_link_libraries(reone PRIVATE ${SDL2_LIBRARIES} ${OpenAL_LIBRARIES} Threads::Threads -latomic)
|
2020-10-26 02:19:33 +00:00
|
|
|
endif()
|
2020-10-11 04:02:29 +00:00
|
|
|
|
2021-05-21 15:57:55 +00:00
|
|
|
list(APPEND InstallTargets reone)
|
|
|
|
|
2021-05-22 01:36:24 +00:00
|
|
|
## END reone executable
|
|
|
|
|
2020-10-11 04:02:29 +00:00
|
|
|
## reone-tools executable
|
2020-10-10 08:00:01 +00:00
|
|
|
|
2020-08-03 13:16:58 +00:00
|
|
|
if(BUILD_TOOLS)
|
|
|
|
set(TOOLS_HEADERS
|
2021-05-05 01:08:12 +00:00
|
|
|
src/tools/program.h
|
|
|
|
src/tools/tools.h
|
|
|
|
src/tools/types.h)
|
2020-08-03 13:16:58 +00:00
|
|
|
|
|
|
|
set(TOOLS_SOURCES
|
2021-05-05 01:08:12 +00:00
|
|
|
src/tools/2datool.cpp
|
|
|
|
src/tools/audiotool.cpp
|
|
|
|
src/tools/erftool.cpp
|
|
|
|
src/tools/gfftool.cpp
|
|
|
|
src/tools/keybiftool.cpp
|
|
|
|
src/tools/liptool.cpp
|
|
|
|
src/tools/main.cpp
|
|
|
|
src/tools/program.cpp
|
|
|
|
src/tools/pthtool.cpp
|
|
|
|
src/tools/rimtool.cpp
|
|
|
|
src/tools/tlktool.cpp
|
|
|
|
src/tools/tpctool.cpp)
|
2020-08-03 13:16:58 +00:00
|
|
|
|
2020-10-11 04:02:29 +00:00
|
|
|
add_executable(reone-tools ${TOOLS_HEADERS} ${TOOLS_SOURCES})
|
2020-10-11 05:55:10 +00:00
|
|
|
set_target_properties(reone-tools PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
2021-01-13 12:59:15 +00:00
|
|
|
|
|
|
|
target_link_libraries(reone-tools PRIVATE
|
2021-05-04 17:24:53 +00:00
|
|
|
libgraphics libresource libcommon
|
2021-05-04 09:22:22 +00:00
|
|
|
libs3tc
|
2021-01-13 12:59:15 +00:00
|
|
|
GLEW::GLEW
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
${Boost_FILESYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_SYSTEM_LIBRARY})
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(reone PRIVATE SDL2::SDL2)
|
|
|
|
else()
|
|
|
|
target_link_libraries(reone PRIVATE ${SDL2_LIBRARIES})
|
|
|
|
endif()
|
2021-05-21 15:57:55 +00:00
|
|
|
list(APPEND InstallTargets reone-tools)
|
2020-08-03 13:16:58 +00:00
|
|
|
endif()
|
2020-10-10 08:25:36 +00:00
|
|
|
|
2020-10-11 04:02:29 +00:00
|
|
|
## END reone-tools executable
|
|
|
|
|
2021-03-11 09:21:39 +00:00
|
|
|
## reone-launcher executable
|
2021-03-09 14:19:55 +00:00
|
|
|
|
|
|
|
if(BUILD_LAUNCHER)
|
|
|
|
if(wxWidgets_FOUND)
|
|
|
|
set(LAUNCHER_HEADERS
|
2021-05-05 01:08:12 +00:00
|
|
|
src/launcher/app.h
|
|
|
|
src/launcher/frame.h)
|
2021-03-09 14:19:55 +00:00
|
|
|
|
|
|
|
set(LAUNCHER_SOURCES
|
2021-05-05 01:08:12 +00:00
|
|
|
src/launcher/app.cpp
|
|
|
|
src/launcher/frame.cpp)
|
2021-03-09 14:19:55 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
list(APPEND LAUNCHER_SOURCES res/reone.rc)
|
2021-03-11 09:21:39 +00:00
|
|
|
add_executable(reone-launcher WIN32 ${LAUNCHER_HEADERS} ${LAUNCHER_SOURCES})
|
2021-03-09 14:19:55 +00:00
|
|
|
else()
|
2021-03-11 09:21:39 +00:00
|
|
|
add_executable(reone-launcher ${LAUNCHER_HEADERS} ${LAUNCHER_SOURCES})
|
2021-03-09 14:19:55 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
include(${wxWidgets_USE_FILE})
|
2021-03-11 09:21:39 +00:00
|
|
|
target_link_libraries(reone-launcher ${wxWidgets_LIBRARIES} ${Boost_FILESYSTEM_LIBRARY} ${Boost_PROGRAM_OPTIONS_LIBRARY} ${Boost_SYSTEM_LIBRARY})
|
2021-03-09 14:19:55 +00:00
|
|
|
|
2021-03-11 09:21:39 +00:00
|
|
|
set_target_properties(reone-launcher PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
2021-05-21 15:57:55 +00:00
|
|
|
list(APPEND InstallTargets reone-launcher)
|
2021-03-09 14:19:55 +00:00
|
|
|
else()
|
|
|
|
message(WARNING "wxWidgets not found - launcher cannot be built")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
2021-03-11 09:21:39 +00:00
|
|
|
## END reone-launcher executable
|
2021-03-09 14:19:55 +00:00
|
|
|
|
2020-10-11 04:02:29 +00:00
|
|
|
## Unit tests
|
|
|
|
|
2020-10-10 08:25:36 +00:00
|
|
|
if(BUILD_TESTS)
|
|
|
|
enable_testing()
|
2021-05-05 01:08:12 +00:00
|
|
|
file(GLOB TEST_FILES "src/tests/*.cpp")
|
2020-10-11 09:56:50 +00:00
|
|
|
foreach(TEST_FILE ${TEST_FILES})
|
|
|
|
get_filename_component(TEST_NAME "${TEST_FILE}" NAME_WE)
|
|
|
|
add_executable(test_${TEST_NAME} ${TEST_FILE})
|
2021-03-08 05:32:01 +00:00
|
|
|
target_link_libraries(test_${TEST_NAME} PRIVATE libgame libscript libresource libcommon ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
|
2020-10-26 02:19:33 +00:00
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(test_${TEST_NAME} PRIVATE SDL2::SDL2)
|
|
|
|
else()
|
|
|
|
target_link_libraries(test_${TEST_NAME} PRIVATE ${SDL2_LIBRARIES})
|
|
|
|
endif()
|
|
|
|
|
2020-10-11 09:56:50 +00:00
|
|
|
add_test(${TEST_NAME} test_${TEST_NAME})
|
|
|
|
endforeach()
|
2020-10-10 08:25:36 +00:00
|
|
|
endif()
|
2020-10-11 04:02:29 +00:00
|
|
|
|
2020-10-29 02:43:35 +00:00
|
|
|
## END Unit tests
|
2021-05-21 15:57:55 +00:00
|
|
|
|
2021-05-22 01:36:24 +00:00
|
|
|
## Installation
|
|
|
|
|
2021-05-21 15:57:55 +00:00
|
|
|
if(UNIX AND NOT APPLE)
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
install(TARGETS ${InstallTargets} DESTINATION ${CMAKE_INSTALL_BINDIR})
|
|
|
|
install(TARGETS libcommon libresource libgraphics libaudio libvideo libscript libgame DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
2021-05-22 01:36:24 +00:00
|
|
|
|
|
|
|
## END Installation
|