2017-01-15 03:07:01 +00:00
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
${BOO_INCLUDE_DIR} ${LIBJPEG_INCLUDE_DIR}
|
2017-01-08 02:52:49 +00:00
|
|
|
${ZLIB_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/DataSpec ${JBUS_INCLUDE_DIR})
|
2015-08-18 22:51:54 +00:00
|
|
|
|
2016-04-24 04:03:30 +00:00
|
|
|
macro(runtime_add_list rel_path a_list)
|
|
|
|
unset(tmp_list)
|
|
|
|
foreach(path IN LISTS ${a_list})
|
2019-05-08 03:50:21 +00:00
|
|
|
if(IS_ABSOLUTE ${path})
|
|
|
|
list(APPEND tmp_list "${path}")
|
|
|
|
else()
|
|
|
|
list(APPEND tmp_list "${rel_path}/${path}")
|
|
|
|
endif()
|
2016-04-24 04:03:30 +00:00
|
|
|
endforeach(path)
|
|
|
|
set(${a_list} "${tmp_list}" PARENT_SCOPE)
|
|
|
|
endmacro(runtime_add_list)
|
|
|
|
|
2015-08-18 22:51:54 +00:00
|
|
|
add_subdirectory(Audio)
|
|
|
|
add_subdirectory(Character)
|
|
|
|
add_subdirectory(Graphics)
|
2016-04-17 22:38:05 +00:00
|
|
|
add_subdirectory(Collision)
|
2016-04-16 21:49:47 +00:00
|
|
|
add_subdirectory(Camera)
|
2016-04-16 23:48:29 +00:00
|
|
|
add_subdirectory(World)
|
2016-11-22 20:43:16 +00:00
|
|
|
add_subdirectory(Weapon)
|
2016-04-16 23:48:29 +00:00
|
|
|
add_subdirectory(AutoMapper)
|
2015-08-18 22:51:54 +00:00
|
|
|
add_subdirectory(GuiSys)
|
|
|
|
add_subdirectory(Input)
|
|
|
|
add_subdirectory(Particle)
|
|
|
|
|
2015-08-23 06:42:29 +00:00
|
|
|
if(WIN32)
|
|
|
|
list(APPEND PLAT_SRCS CMemoryCardSysWin.cpp)
|
|
|
|
elseif(APPLE)
|
2015-09-02 19:10:11 +00:00
|
|
|
list(APPEND PLAT_SRCS CMemoryCardSysOSX.cpp)
|
2015-08-23 06:42:29 +00:00
|
|
|
else()
|
2016-12-24 06:08:48 +00:00
|
|
|
list(APPEND PLAT_SRCS CMemoryCardSysNix.cpp)
|
2015-08-23 06:42:29 +00:00
|
|
|
endif()
|
|
|
|
|
2017-01-15 03:07:01 +00:00
|
|
|
add_custom_command(OUTPUT TCastTo.hpp TCastTo.cpp DEPENDS MkCastTo.py
|
|
|
|
COMMAND python ARGS ${CMAKE_CURRENT_SOURCE_DIR}/MkCastTo.py
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
COMMENT "Generating cast functions")
|
|
|
|
|
2016-04-24 04:03:30 +00:00
|
|
|
add_subdirectory(MP1)
|
|
|
|
add_subdirectory(MP2)
|
|
|
|
add_subdirectory(MP3)
|
|
|
|
|
2017-02-09 09:23:17 +00:00
|
|
|
if(APPLE)
|
|
|
|
set_source_files_properties(MP1/CFrontEndUITouchBarMac.mm
|
2017-02-12 03:17:18 +00:00
|
|
|
MP1/CSaveGameScreenTouchBarMac.mm
|
2017-02-10 09:00:57 +00:00
|
|
|
CGameOptionsTouchBarMac.mm
|
2017-02-09 09:23:17 +00:00
|
|
|
PROPERTIES COMPILE_FLAGS -fobjc-arc)
|
2017-12-29 08:08:12 +00:00
|
|
|
bintoc(startButton.cpp Resources/startButton@2x.png START_BUTTON_2X)
|
2017-12-29 08:21:07 +00:00
|
|
|
list(APPEND PLAT_SRCS startButton.cpp CGameOptionsTouchBarMac.mm)
|
2017-02-09 09:23:17 +00:00
|
|
|
endif()
|
|
|
|
|
2019-02-07 04:10:07 +00:00
|
|
|
set(RUNTIME_SOURCES_A
|
|
|
|
RetroTypes.hpp RetroTypes.cpp
|
|
|
|
${CLIENT_SOURCES}
|
|
|
|
${MP1_SOURCES}
|
|
|
|
${AUDIO_SOURCES}
|
|
|
|
${AUTOMAPPER_SOURCES}
|
|
|
|
${CAMERA_SOURCES}
|
|
|
|
${CHARACTER_SOURCES}
|
2019-02-24 08:42:33 +00:00
|
|
|
${COLLISION_SOURCES}
|
|
|
|
${GRAPHICS_SOURCES})
|
2019-02-07 04:10:07 +00:00
|
|
|
|
|
|
|
set(RUNTIME_SOURCES_B
|
|
|
|
${GUISYS_SOURCES}
|
|
|
|
${INPUT_SOURCES}
|
|
|
|
${PARTICLE_SOURCES}
|
|
|
|
${WORLD_SOURCES}
|
|
|
|
${WEAPON_SOURCES}
|
|
|
|
ITweak.hpp
|
|
|
|
IMain.hpp
|
|
|
|
CStopwatch.hpp
|
|
|
|
CGameAllocator.hpp CGameAllocator.cpp
|
|
|
|
CMemoryCardSys.hpp CMemoryCardSys.cpp
|
|
|
|
CScannableObjectInfo.hpp CScannableObjectInfo.cpp
|
|
|
|
CSaveWorld.hpp CSaveWorld.cpp
|
|
|
|
CDependencyGroup.hpp CDependencyGroup.cpp
|
|
|
|
CBasics.hpp CBasicsPC.cpp
|
|
|
|
CIOWin.hpp
|
|
|
|
CIOWinManager.hpp CIOWinManager.cpp
|
|
|
|
CStateManager.hpp CStateManager.cpp
|
|
|
|
CGameState.hpp CGameState.cpp
|
|
|
|
CRelayTracker.hpp CRelayTracker.cpp
|
|
|
|
CPlayerState.hpp CPlayerState.cpp
|
|
|
|
CRandom16.hpp CRandom16.cpp
|
|
|
|
CResFactory.hpp CResFactory.cpp
|
|
|
|
CResLoader.hpp CResLoader.cpp
|
|
|
|
CDvdRequest.hpp
|
|
|
|
CDvdFile.hpp CDvdFile.cpp
|
|
|
|
IObjectStore.hpp
|
|
|
|
CSimplePool.hpp CSimplePool.cpp
|
|
|
|
CGameOptions.hpp CGameOptions.cpp
|
|
|
|
CGameOptionsTouchBar.hpp CGameOptionsTouchBar.cpp
|
|
|
|
CStaticInterference.hpp CStaticInterference.cpp
|
|
|
|
CCRC32.hpp CCRC32.cpp
|
|
|
|
IFactory.hpp
|
|
|
|
IObjFactory.hpp
|
|
|
|
CObjectList.hpp CObjectList.cpp
|
|
|
|
GameObjectLists.hpp GameObjectLists.cpp
|
|
|
|
CSortedLists.hpp CSortedLists.cpp
|
|
|
|
CArchitectureMessage.hpp
|
|
|
|
CArchitectureQueue.hpp
|
|
|
|
IObj.hpp
|
|
|
|
IVParamObj.hpp
|
|
|
|
CTimeProvider.hpp CTimeProvider.cpp
|
|
|
|
CToken.hpp CToken.cpp
|
|
|
|
CFactoryMgr.hpp CFactoryMgr.cpp
|
|
|
|
CPakFile.hpp CPakFile.cpp
|
|
|
|
CStringExtras.hpp
|
|
|
|
IOStreams.hpp IOStreams.cpp
|
|
|
|
CMainFlowBase.hpp CMainFlowBase.cpp
|
|
|
|
CMFGameBase.hpp
|
|
|
|
CInGameTweakManagerBase.hpp
|
|
|
|
CPlayMovieBase.hpp
|
|
|
|
CGameDebug.hpp
|
|
|
|
CGameHintInfo.hpp CGameHintInfo.cpp
|
|
|
|
rstl.hpp
|
|
|
|
GameGlobalObjects.hpp GameGlobalObjects.cpp
|
|
|
|
MkCastTo.py
|
|
|
|
TCastTo.hpp TCastTo.cpp
|
|
|
|
GCNTypes.hpp
|
|
|
|
${PLAT_SRCS})
|
|
|
|
|
|
|
|
function(add_runtime_common_library name)
|
|
|
|
add_library(${name} ${ARGN})
|
2017-12-12 02:06:19 +00:00
|
|
|
if(COMMAND add_sanitizers)
|
2019-02-07 04:10:07 +00:00
|
|
|
add_sanitizers(${name})
|
2017-12-12 02:06:19 +00:00
|
|
|
endif()
|
2017-12-29 08:08:12 +00:00
|
|
|
if(COMMAND cotire)
|
2019-02-07 04:10:07 +00:00
|
|
|
set_target_properties(${name} PROPERTIES COTIRE_ADD_UNITY_BUILD FALSE)
|
|
|
|
cotire(${name})
|
2017-12-29 08:08:12 +00:00
|
|
|
endif()
|
2019-02-07 04:10:07 +00:00
|
|
|
add_dependencies(${name} ${HECL_APPLICATION_REPS_TARGETS_LIST})
|
2017-12-07 04:13:12 +00:00
|
|
|
|
|
|
|
if(WINDOWS_STORE)
|
2019-02-07 04:10:07 +00:00
|
|
|
set_property(TARGET ${name} PROPERTY VS_WINRT_COMPONENT TRUE)
|
|
|
|
endif()
|
|
|
|
endfunction()
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
# WTF MS???? LINK.EXE is unable to address static libraries larger than 4GB.
|
|
|
|
# This is a hack to split this large library in two.
|
|
|
|
add_runtime_common_library(RuntimeCommon ${RUNTIME_SOURCES_A})
|
|
|
|
add_runtime_common_library(RuntimeCommonB ${RUNTIME_SOURCES_B})
|
|
|
|
target_link_libraries(RuntimeCommon RuntimeCommonB)
|
|
|
|
else()
|
|
|
|
add_runtime_common_library(RuntimeCommon ${RUNTIME_SOURCES_A} ${RUNTIME_SOURCES_B})
|
2017-12-07 04:13:12 +00:00
|
|
|
endif()
|
2019-05-08 03:50:21 +00:00
|
|
|
|
|
|
|
target_link_libraries(RuntimeCommon CModelShaders)
|