mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
fb985d2503
Still not complete…
130 lines
3.4 KiB
CMake
130 lines
3.4 KiB
CMake
cmake_minimum_required( VERSION 3.1.0 )
|
|
|
|
require_stricmp()
|
|
require_strnicmp()
|
|
|
|
# Build does not work with signed chars!
|
|
if (MSVC)
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /J" )
|
|
else()
|
|
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -funsigned-char -Wno-missing-braces -Wno-char-subscripts -Wno-unused-variable" )
|
|
endif()
|
|
|
|
include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../../build/include" )
|
|
|
|
if (WIN32)
|
|
include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include" "${CMAKE_CURRENT_SOURCE_DIR}/../../platform/windows/include/vpx")
|
|
else ()
|
|
include_directories( "${ZLIB_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}")
|
|
endif()
|
|
|
|
include_directories(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/..
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../build/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
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/fonts
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/2d
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/music
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../common/input
|
|
${CMAKE_CURRENT_SOURCE_DIR}/../platform
|
|
${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
|
|
)
|
|
|
|
|
|
|
|
#set( NOT_COMPILED_SOURCE_FILES
|
|
# src/gamestructures.cpp
|
|
#)
|
|
|
|
#set_source_files_properties( ${NOT_COMPILED_SOURCE_FILES} PROPERTIES HEADER_FILE_ONLY TRUE )
|
|
|
|
set( PCH_SOURCES
|
|
src/aistuff.cpp
|
|
src/anims.cpp
|
|
src/anubis.cpp
|
|
src/bubbles.cpp
|
|
src/bullet.cpp
|
|
src/cd.cpp
|
|
src/enginesubs.cpp
|
|
src/exhumed.cpp
|
|
src/fish.cpp
|
|
src/grenade.cpp
|
|
src/gun.cpp
|
|
src/init.cpp
|
|
src/input.cpp
|
|
src/items.cpp
|
|
src/lavadude.cpp
|
|
src/light.cpp
|
|
src/lighting.cpp
|
|
src/lion.cpp
|
|
src/main.cpp
|
|
src/map.cpp
|
|
src/menu.cpp
|
|
src/mono.cpp
|
|
src/move.cpp
|
|
src/movie.cpp
|
|
src/mummy.cpp
|
|
src/network.cpp
|
|
src/object.cpp
|
|
src/osdcmds.cpp
|
|
src/paul.cpp
|
|
src/player.cpp
|
|
src/queen.cpp
|
|
src/ra.cpp
|
|
src/random.cpp
|
|
src/rat.cpp
|
|
src/record.cpp
|
|
src/rex.cpp
|
|
src/roach.cpp
|
|
src/runlist.cpp
|
|
src/save.cpp
|
|
src/scorp.cpp
|
|
src/sequence.cpp
|
|
src/serial.cpp
|
|
src/set.cpp
|
|
src/snake.cpp
|
|
src/sound.cpp
|
|
src/spider.cpp
|
|
src/status.cpp
|
|
src/stream.cpp
|
|
src/switch.cpp
|
|
src/text2.cpp
|
|
src/timer.cpp
|
|
src/trigdat.cpp
|
|
src/view.cpp
|
|
src/wasp.cpp
|
|
src/d_menu.cpp
|
|
)
|
|
|
|
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( exhumed STATIC
|
|
${HEADER_FILES}
|
|
${PCH_SOURCES}
|
|
#${NOT_COMPILED_SOURCE_FILES}
|
|
)
|
|
|
|
|