2019-10-29 18:53:46 +00:00
|
|
|
cmake_minimum_required( VERSION 3.1.0 )
|
2019-10-16 21:09:02 +00:00
|
|
|
|
2020-01-06 01:41:47 +00:00
|
|
|
require_stricmp()
|
|
|
|
require_strnicmp()
|
|
|
|
|
|
|
|
# Build does not work with signed chars!
|
2019-10-16 21:09:02 +00:00
|
|
|
if (MSVC)
|
|
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /J" )
|
2020-01-06 01:41:47 +00:00
|
|
|
else()
|
2020-01-07 00:11:19 +00:00
|
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -funsigned-char -Wno-missing-braces -Wno-char-subscripts -Wno-unused-variable" )
|
2019-10-16 21:09:02 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../../build/include" )
|
|
|
|
|
|
|
|
if (WIN32)
|
2020-01-07 00:11:19 +00:00
|
|
|
include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include/vpx")
|
2019-10-16 21:09:02 +00:00
|
|
|
else ()
|
2020-01-07 00:11:19 +00:00
|
|
|
include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}")
|
2019-10-16 21:09:02 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
include_directories(
|
2020-01-06 01:41:47 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/..
|
2019-10-16 21:09:02 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../build/include
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../audiolib/include
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../libsmackerdec/include
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../thirdparty/include
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/utility
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/console
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/textures
|
2019-11-05 19:07:16 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/fonts
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/2d
|
2019-11-10 22:58:51 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/music
|
2019-12-14 19:15:15 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/input
|
2019-10-16 21:09:02 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../platform
|
2019-12-28 17:20:47 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl_load
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/system
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/renderer
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/gl/shaders
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/data
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/postprocessing
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering/hwrenderer/utility
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/rendering
|
2019-10-16 21:09:02 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2019-10-31 22:25:21 +00:00
|
|
|
|
2019-10-16 21:09:02 +00:00
|
|
|
set( PCH_SOURCES
|
|
|
|
src/actor.cpp
|
|
|
|
src/ai.cpp
|
|
|
|
src/aibat.cpp
|
|
|
|
src/aibeast.cpp
|
|
|
|
src/aiboneel.cpp
|
|
|
|
src/aiburn.cpp
|
|
|
|
src/aicaleb.cpp
|
|
|
|
src/aicerber.cpp
|
|
|
|
src/aicult.cpp
|
|
|
|
src/aigarg.cpp
|
|
|
|
src/aighost.cpp
|
|
|
|
src/aigilbst.cpp
|
|
|
|
src/aihand.cpp
|
|
|
|
src/aihound.cpp
|
|
|
|
src/aiinnoc.cpp
|
|
|
|
src/aipod.cpp
|
|
|
|
src/airat.cpp
|
|
|
|
src/aispid.cpp
|
|
|
|
src/aitchern.cpp
|
|
|
|
src/aiunicult.cpp
|
|
|
|
src/aizomba.cpp
|
|
|
|
src/aizombf.cpp
|
|
|
|
src/asound.cpp
|
|
|
|
src/barf.cpp
|
|
|
|
src/blood.cpp
|
|
|
|
src/callback.cpp
|
|
|
|
src/choke.cpp
|
|
|
|
src/common.cpp
|
|
|
|
src/config.cpp
|
|
|
|
src/controls.cpp
|
|
|
|
src/credits.cpp
|
|
|
|
src/db.cpp
|
|
|
|
src/demo.cpp
|
|
|
|
src/dude.cpp
|
|
|
|
src/endgame.cpp
|
|
|
|
src/eventq.cpp
|
|
|
|
src/fire.cpp
|
|
|
|
src/fx.cpp
|
|
|
|
src/gamemenu.cpp
|
|
|
|
src/gameutil.cpp
|
|
|
|
src/getopt.cpp
|
|
|
|
src/gib.cpp
|
|
|
|
src/globals.cpp
|
|
|
|
src/inifile.cpp
|
|
|
|
src/iob.cpp
|
|
|
|
src/levels.cpp
|
|
|
|
src/loadsave.cpp
|
|
|
|
src/map2d.cpp
|
|
|
|
src/menu.cpp
|
|
|
|
src/messages.cpp
|
|
|
|
src/mirrors.cpp
|
|
|
|
src/misc.cpp
|
|
|
|
src/network.cpp
|
|
|
|
src/osdcmd.cpp
|
|
|
|
src/player.cpp
|
|
|
|
src/qav.cpp
|
|
|
|
src/qheap.cpp
|
|
|
|
src/replace.cpp
|
|
|
|
src/resource.cpp
|
|
|
|
src/screen.cpp
|
2019-10-19 18:48:59 +00:00
|
|
|
src/screentext.cpp
|
2019-10-16 21:09:02 +00:00
|
|
|
src/sectorfx.cpp
|
|
|
|
src/seq.cpp
|
|
|
|
src/sfx.cpp
|
|
|
|
src/sound.cpp
|
|
|
|
src/tile.cpp
|
|
|
|
src/trig.cpp
|
|
|
|
src/triggers.cpp
|
|
|
|
src/view.cpp
|
|
|
|
src/warp.cpp
|
|
|
|
src/weapon.cpp
|
2019-12-01 09:18:38 +00:00
|
|
|
src/d_menu.cpp
|
2019-10-16 21:09:02 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if( MSVC )
|
|
|
|
enable_precompiled_headers( ../g_pch.h PCH_SOURCES )
|
|
|
|
# The original Build code was written with unsigned chars and unfortunately they still haven't been eliminated entirely.
|
|
|
|
# All other code should stay with signed chars. What a mess... :(
|
|
|
|
#set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "/J" )
|
|
|
|
else()
|
|
|
|
# Temporary solution for compilers other than MSVC
|
|
|
|
set_source_files_properties( ${PCH_SOURCES} PROPERTIES COMPILE_FLAGS "-include g_pch.h" )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
file( GLOB HEADER_FILES
|
|
|
|
src/*.h
|
|
|
|
)
|
|
|
|
add_library( blood STATIC
|
|
|
|
${HEADER_FILES}
|
|
|
|
${PCH_SOURCES}
|
|
|
|
)
|
|
|
|
|
|
|
|
|