2015-08-18 05:54:43 +00:00
|
|
|
include_directories(${LIBPNG_INCLUDE_DIR} ${SQUISH_INCLUDE_DIR})
|
2015-07-07 03:22:44 +00:00
|
|
|
|
2015-07-09 06:40:55 +00:00
|
|
|
# Assembles a source/header pair list for use in a DNA library
|
2016-10-09 07:45:04 +00:00
|
|
|
macro(make_dnalist outlist subdir)
|
|
|
|
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${subdir}")
|
2016-04-07 03:40:25 +00:00
|
|
|
foreach(type ${ARGN})
|
2015-08-17 23:46:41 +00:00
|
|
|
get_filename_component(dir ${type} DIRECTORY)
|
2015-08-18 23:07:46 +00:00
|
|
|
if(dir)
|
2016-10-09 07:45:04 +00:00
|
|
|
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/${subdir}/${dir}")
|
2015-08-18 23:07:46 +00:00
|
|
|
set(dir "${dir}/")
|
|
|
|
endif()
|
2015-08-17 23:46:41 +00:00
|
|
|
get_filename_component(name ${type} NAME)
|
2016-10-09 07:45:04 +00:00
|
|
|
atdna("${subdir}/${dir}atdna_${name}.cpp" "${subdir}/${dir}${name}.hpp")
|
2015-08-17 23:46:41 +00:00
|
|
|
list(APPEND ${outlist}
|
2016-10-09 07:45:04 +00:00
|
|
|
${subdir}/${dir}atdna_${name}.cpp
|
|
|
|
${subdir}/${dir}${name}.hpp)
|
2015-07-09 07:15:43 +00:00
|
|
|
endforeach()
|
2015-07-09 06:40:55 +00:00
|
|
|
endmacro()
|
|
|
|
|
2016-10-07 18:44:45 +00:00
|
|
|
# Assembles source files together for the main DataSpecCommon library
|
|
|
|
macro(dataspec_add_list rel_path a_list)
|
|
|
|
unset(tmp_list)
|
|
|
|
foreach(path IN LISTS ${a_list})
|
|
|
|
if (IS_ABSOLUTE ${path})
|
|
|
|
list(APPEND tmp_list "${path}")
|
|
|
|
else()
|
|
|
|
list(APPEND tmp_list "${rel_path}/${path}")
|
|
|
|
endif()
|
|
|
|
endforeach(path)
|
2016-10-09 07:45:04 +00:00
|
|
|
set(${a_list} "${tmp_list}")
|
2016-10-07 18:44:45 +00:00
|
|
|
endmacro(dataspec_add_list)
|
|
|
|
|
2015-07-22 19:05:18 +00:00
|
|
|
include_directories(${ZLIB_INCLUDE_DIR} ${LZO_INCLUDE_DIR})
|
|
|
|
|
2015-07-09 07:15:43 +00:00
|
|
|
# Each game's DNA library
|
2016-10-09 07:45:04 +00:00
|
|
|
include(DNACommon/CMakeLists.txt)
|
|
|
|
include(DNAMP1/CMakeLists.txt)
|
|
|
|
include(DNAMP2/CMakeLists.txt)
|
|
|
|
include(DNAMP3/CMakeLists.txt)
|
2015-07-07 03:22:44 +00:00
|
|
|
|
2015-08-04 21:35:41 +00:00
|
|
|
# Embed master shader script
|
|
|
|
bintoc(RetroMasterShader.c Blender/RetroMasterShader.py RETRO_MASTER_SHADER)
|
|
|
|
|
2017-07-23 23:45:04 +00:00
|
|
|
# Download asset name databases
|
|
|
|
add_custom_command(OUTPUT AssetNameMap32.bin COMMAND ${CMAKE_COMMAND} ARGS -P
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/AssetMap32Download.cmake)
|
2017-07-13 11:39:52 +00:00
|
|
|
bintoc(AssetNameMap32.c ${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap32.bin ASSET_NAME_MP32)
|
|
|
|
|
2017-07-23 23:45:04 +00:00
|
|
|
add_custom_command(OUTPUT AssetNameMap64.bin COMMAND ${CMAKE_COMMAND} ARGS -P
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/AssetMap64Download.cmake)
|
2017-07-13 11:39:52 +00:00
|
|
|
bintoc(AssetNameMap64.c ${CMAKE_CURRENT_BINARY_DIR}/AssetNameMap64.bin ASSET_NAME_MP64)
|
|
|
|
|
2015-07-09 07:15:43 +00:00
|
|
|
# Each game's DataSpec implementation
|
2015-07-07 03:22:44 +00:00
|
|
|
add_library(RetroDataSpec
|
|
|
|
SpecBase.cpp
|
2016-10-07 18:44:45 +00:00
|
|
|
${DNACOMMON_SOURCES}
|
2015-07-07 03:22:44 +00:00
|
|
|
SpecMP1.cpp
|
2016-10-07 18:44:45 +00:00
|
|
|
${DNAMP1_SOURCES}
|
2016-10-09 07:45:04 +00:00
|
|
|
${ScriptObjectsMP1_SOURCES}
|
2015-07-07 03:22:44 +00:00
|
|
|
SpecMP2.cpp
|
2016-10-07 18:44:45 +00:00
|
|
|
${DNAMP2_SOURCES}
|
2015-08-04 21:35:41 +00:00
|
|
|
SpecMP3.cpp
|
2016-10-07 18:44:45 +00:00
|
|
|
${DNAMP3_SOURCES}
|
2015-08-04 21:35:41 +00:00
|
|
|
Blender/BlenderSupport.hpp
|
|
|
|
Blender/BlenderSupport.cpp
|
|
|
|
Blender/RetroMasterShader.py
|
2017-07-13 11:39:52 +00:00
|
|
|
AssetNameMap.hpp
|
|
|
|
AssetNameMap.cpp
|
|
|
|
AssetNameMap32.bin AssetNameMap32.c
|
|
|
|
AssetNameMap64.bin AssetNameMap64.c
|
2015-08-04 21:35:41 +00:00
|
|
|
RetroMasterShader.c)
|
2017-12-12 02:06:19 +00:00
|
|
|
if(COMMAND add_sanitizers)
|
|
|
|
add_sanitizers(RetroDataSpec)
|
|
|
|
endif()
|