mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-17 10:00:54 +00:00
040cb17370
# Conflicts: # CMakeLists.txt # libraries/glslang/OGLCompilersDLL/CMakeLists.txt # libraries/glslang/OGLCompilersDLL/InitializeDll.cpp # libraries/glslang/OGLCompilersDLL/InitializeDll.h # libraries/glslang/glslang/CMakeLists.txt # libraries/glslang/glslang/GenericCodeGen/CodeGen.cpp # libraries/glslang/glslang/GenericCodeGen/Link.cpp # libraries/glslang/glslang/Include/BaseTypes.h # libraries/glslang/glslang/Include/Common.h # libraries/glslang/glslang/Include/ConstantUnion.h # libraries/glslang/glslang/Include/InfoSink.h # libraries/glslang/glslang/Include/InitializeGlobals.h # libraries/glslang/glslang/Include/PoolAlloc.h # libraries/glslang/glslang/Include/ResourceLimits.h # libraries/glslang/glslang/Include/ShHandle.h # libraries/glslang/glslang/Include/Types.h # libraries/glslang/glslang/Include/arrays.h # libraries/glslang/glslang/Include/intermediate.h # libraries/glslang/glslang/Include/revision.h # libraries/glslang/glslang/Include/revision.template # libraries/glslang/glslang/MachineIndependent/Constant.cpp # libraries/glslang/glslang/MachineIndependent/InfoSink.cpp # libraries/glslang/glslang/MachineIndependent/Initialize.cpp # libraries/glslang/glslang/MachineIndependent/Initialize.h # libraries/glslang/glslang/MachineIndependent/IntermTraverse.cpp # libraries/glslang/glslang/MachineIndependent/Intermediate.cpp # libraries/glslang/glslang/MachineIndependent/LiveTraverser.h # libraries/glslang/glslang/MachineIndependent/ParseContextBase.cpp # libraries/glslang/glslang/MachineIndependent/ParseHelper.cpp # libraries/glslang/glslang/MachineIndependent/ParseHelper.h # libraries/glslang/glslang/MachineIndependent/PoolAlloc.cpp # libraries/glslang/glslang/MachineIndependent/RemoveTree.cpp # libraries/glslang/glslang/MachineIndependent/RemoveTree.h # libraries/glslang/glslang/MachineIndependent/Scan.cpp # libraries/glslang/glslang/MachineIndependent/Scan.h # libraries/glslang/glslang/MachineIndependent/ScanContext.h # libraries/glslang/glslang/MachineIndependent/ShaderLang.cpp # libraries/glslang/glslang/MachineIndependent/SymbolTable.cpp # libraries/glslang/glslang/MachineIndependent/SymbolTable.h # libraries/glslang/glslang/MachineIndependent/Versions.cpp # libraries/glslang/glslang/MachineIndependent/Versions.h # libraries/glslang/glslang/MachineIndependent/attribute.cpp # libraries/glslang/glslang/MachineIndependent/attribute.h # libraries/glslang/glslang/MachineIndependent/gl_types.h # libraries/glslang/glslang/MachineIndependent/glslang.y # libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp # libraries/glslang/glslang/MachineIndependent/glslang_tab.cpp.h # libraries/glslang/glslang/MachineIndependent/intermOut.cpp # libraries/glslang/glslang/MachineIndependent/iomapper.cpp # libraries/glslang/glslang/MachineIndependent/iomapper.h # libraries/glslang/glslang/MachineIndependent/limits.cpp # libraries/glslang/glslang/MachineIndependent/linkValidate.cpp # libraries/glslang/glslang/MachineIndependent/localintermediate.h # libraries/glslang/glslang/MachineIndependent/parseConst.cpp # libraries/glslang/glslang/MachineIndependent/parseVersions.h # libraries/glslang/glslang/MachineIndependent/pch.cpp # libraries/glslang/glslang/MachineIndependent/pch.h # libraries/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp # libraries/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp # libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp # libraries/glslang/glslang/MachineIndependent/preprocessor/PpContext.h # libraries/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp # libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp # libraries/glslang/glslang/MachineIndependent/preprocessor/PpTokens.h # libraries/glslang/glslang/MachineIndependent/propagateNoContraction.cpp # libraries/glslang/glslang/MachineIndependent/propagateNoContraction.h # libraries/glslang/glslang/MachineIndependent/reflection.cpp # libraries/glslang/glslang/MachineIndependent/reflection.h # libraries/glslang/glslang/OSDependent/Unix/CMakeLists.txt # libraries/glslang/glslang/OSDependent/Unix/ossource.cpp # libraries/glslang/glslang/OSDependent/Windows/CMakeLists.txt # libraries/glslang/glslang/OSDependent/Windows/main.cpp # libraries/glslang/glslang/OSDependent/Windows/ossource.cpp # libraries/glslang/glslang/OSDependent/osinclude.h # libraries/glslang/glslang/Public/ShaderLang.h # libraries/glslang/glslang/updateGrammar # libraries/glslang/spirv/CMakeLists.txt # libraries/glslang/spirv/GLSL.ext.AMD.h # libraries/glslang/spirv/GLSL.ext.EXT.h # libraries/glslang/spirv/GLSL.ext.KHR.h # libraries/glslang/spirv/GLSL.ext.NV.h # libraries/glslang/spirv/GLSL.std.450.h # libraries/glslang/spirv/GlslangToSpv.cpp # libraries/glslang/spirv/GlslangToSpv.h # libraries/glslang/spirv/InReadableOrder.cpp # libraries/glslang/spirv/Logger.cpp # libraries/glslang/spirv/Logger.h # libraries/glslang/spirv/SPVRemapper.cpp # libraries/glslang/spirv/SPVRemapper.h # libraries/glslang/spirv/SpvBuilder.cpp # libraries/glslang/spirv/SpvBuilder.h # libraries/glslang/spirv/SpvPostProcess.cpp # libraries/glslang/spirv/SpvTools.cpp # libraries/glslang/spirv/SpvTools.h # libraries/glslang/spirv/bitutils.h # libraries/glslang/spirv/disassemble.cpp # libraries/glslang/spirv/disassemble.h # libraries/glslang/spirv/doc.cpp # libraries/glslang/spirv/doc.h # libraries/glslang/spirv/hex_float.h # libraries/glslang/spirv/spirv.hpp # libraries/glslang/spirv/spvIR.h # src/CMakeLists.txt
204 lines
5.8 KiB
CMake
204 lines
5.8 KiB
CMake
# List of source files required by libgme and any emulators
|
|
# This is not 100% accurate (Fir_Resampler for instance) but
|
|
# you'll be OK.
|
|
set(libgme_SRCS Blip_Buffer.cpp
|
|
Classic_Emu.cpp
|
|
Data_Reader.cpp
|
|
Dual_Resampler.cpp
|
|
Effects_Buffer.cpp
|
|
Fir_Resampler.cpp
|
|
gme.cpp
|
|
Gme_File.cpp
|
|
M3u_Playlist.cpp
|
|
Multi_Buffer.cpp
|
|
Music_Emu.cpp
|
|
)
|
|
|
|
# static builds need to find static zlib (and static forms of other needed
|
|
# libraries. Ensure CMake looks only for static libs if we're doing a static
|
|
# build. See https://stackoverflow.com/a/44738756
|
|
if(NOT BUILD_SHARED_LIBS)
|
|
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
|
endif()
|
|
|
|
find_package(ZLIB QUIET)
|
|
|
|
# Ay_Apu is very popular around here
|
|
if (USE_GME_AY OR USE_GME_KSS)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
Ay_Apu.cpp
|
|
)
|
|
endif()
|
|
|
|
# so is Ym2612_Emu
|
|
if (USE_GME_VGM OR USE_GME_GYM)
|
|
if(GME_YM2612_EMU STREQUAL "Nuked")
|
|
add_definitions(-DVGM_YM2612_NUKED)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
Ym2612_Nuked.cpp
|
|
)
|
|
message("VGM/GYM: Nuked OPN2 emulator will be used")
|
|
elseif(GME_YM2612_EMU STREQUAL "MAME")
|
|
add_definitions(-DVGM_YM2612_MAME)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
Ym2612_MAME.cpp
|
|
)
|
|
message("VGM/GYM: MAME YM2612 emulator will be used")
|
|
else()
|
|
add_definitions(-DVGM_YM2612_GENS)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
Ym2612_GENS.cpp
|
|
)
|
|
message("VGM/GYM: GENS 2.10 emulator will be used")
|
|
endif()
|
|
endif()
|
|
|
|
# But none are as popular as Sms_Apu
|
|
if (USE_GME_VGM OR USE_GME_GYM OR USE_GME_KSS)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
Sms_Apu.cpp
|
|
)
|
|
endif()
|
|
|
|
if (USE_GME_AY)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
# Ay_Apu.cpp included earlier
|
|
Ay_Cpu.cpp
|
|
Ay_Emu.cpp
|
|
)
|
|
endif()
|
|
|
|
if (USE_GME_GBS)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
Gb_Apu.cpp
|
|
Gb_Cpu.cpp
|
|
Gb_Oscs.cpp
|
|
Gbs_Emu.cpp
|
|
)
|
|
endif()
|
|
|
|
if (USE_GME_GYM)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
# Sms_Apu.cpp included earlier
|
|
# Ym2612_Emu.cpp included earlier
|
|
Gym_Emu.cpp
|
|
)
|
|
endif()
|
|
|
|
if (USE_GME_HES)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
Hes_Apu.cpp
|
|
Hes_Cpu.cpp
|
|
Hes_Emu.cpp
|
|
)
|
|
endif()
|
|
|
|
if (USE_GME_KSS)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
# Ay_Apu.cpp included earlier
|
|
# Sms_Apu.cpp included earlier
|
|
Kss_Cpu.cpp
|
|
Kss_Emu.cpp
|
|
Kss_Scc_Apu.cpp
|
|
)
|
|
endif()
|
|
|
|
if (USE_GME_NSF OR USE_GME_NSFE)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
Nes_Apu.cpp
|
|
Nes_Cpu.cpp
|
|
Nes_Fme7_Apu.cpp
|
|
Nes_Namco_Apu.cpp
|
|
Nes_Oscs.cpp
|
|
Nes_Vrc6_Apu.cpp
|
|
Nsf_Emu.cpp
|
|
)
|
|
endif()
|
|
|
|
if (USE_GME_NSFE)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
Nsfe_Emu.cpp
|
|
)
|
|
endif()
|
|
|
|
if (USE_GME_SAP)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
Sap_Apu.cpp
|
|
Sap_Cpu.cpp
|
|
Sap_Emu.cpp
|
|
)
|
|
endif()
|
|
|
|
if (USE_GME_SPC)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
Snes_Spc.cpp
|
|
Spc_Cpu.cpp
|
|
Spc_Dsp.cpp
|
|
Spc_Emu.cpp
|
|
Spc_Filter.cpp
|
|
)
|
|
endif()
|
|
|
|
if (USE_GME_VGM)
|
|
set(libgme_SRCS ${libgme_SRCS}
|
|
# Sms_Apu.cpp included earlier
|
|
# Ym2612_Emu.cpp included earlier
|
|
Vgm_Emu.cpp
|
|
Vgm_Emu_Impl.cpp
|
|
Ym2413_Emu.cpp
|
|
)
|
|
endif()
|
|
|
|
# These headers are part of the generic gme interface.
|
|
set (EXPORTED_HEADERS gme.h)
|
|
|
|
# On some platforms we may need to change headers or whatnot based on whether
|
|
# we're building the library or merely using the library. The following is
|
|
# only defined when building the library to allow us to tell which is which.
|
|
|
|
#[ZDoom] Not needed
|
|
#add_definitions(-DBLARGG_BUILD_DLL)
|
|
|
|
# For the gme_types.h
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
# Add library to be compiled.
|
|
add_library(gme STATIC ${libgme_SRCS})
|
|
|
|
if(ZLIB_FOUND)
|
|
message(" ** ZLib library located, compressed file formats will be supported")
|
|
target_compile_definitions(gme PRIVATE -DHAVE_ZLIB_H)
|
|
target_include_directories(gme PRIVATE ${ZLIB_INCLUDE_DIRS})
|
|
target_link_libraries(gme ${ZLIB_LIBRARIES})
|
|
# Is not to be installed though
|
|
|
|
set(PKG_CONFIG_ZLIB -lz) # evaluated in libgme.pc.in
|
|
else()
|
|
message("ZLib library not found, disabling support for compressed formats such as VGZ")
|
|
endif()
|
|
|
|
# [ZDoom] Not needed.
|
|
if( FALSE )
|
|
# The version is the release. The "soversion" is the API version. As long
|
|
# as only build fixes are performed (i.e. no backwards-incompatible changes
|
|
# to the API), the SOVERSION should be the same even when bumping up VERSION.
|
|
# The way gme.h is designed, SOVERSION should very rarely be bumped, if ever.
|
|
# Hopefully the API can stay compatible with old versions.
|
|
set_target_properties(gme
|
|
PROPERTIES VERSION ${GME_VERSION}
|
|
SOVERSION 0)
|
|
|
|
install(TARGETS gme LIBRARY DESTINATION lib${LIB_SUFFIX}
|
|
RUNTIME DESTINATION bin # DLL platforms
|
|
ARCHIVE DESTINATION lib) # DLL platforms
|
|
|
|
# Run during cmake phase, so this is available during make
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/gme_types.h.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/gme_types.h)
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libgme.pc.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/libgme.pc @ONLY)
|
|
|
|
install(FILES ${EXPORTED_HEADERS} DESTINATION include/gme)
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libgme.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
|
|
endif()
|