Duckstation/src/common/CMakeLists.txt

166 lines
3.3 KiB
CMake
Raw Normal View History

2019-11-03 14:39:25 +00:00
add_library(common
2020-01-10 03:31:12 +00:00
align.h
assert.cpp
assert.h
2019-11-03 14:39:25 +00:00
audio_stream.cpp
audio_stream.h
bitfield.h
2020-04-26 07:21:33 +00:00
bitutils.h
2020-01-10 03:31:12 +00:00
byte_stream.cpp
byte_stream.h
2019-11-03 14:39:25 +00:00
cd_image.cpp
cd_image.h
cd_image_bin.cpp
cd_image_cue.cpp
2020-01-30 10:19:27 +00:00
cd_image_chd.cpp
2020-06-07 15:19:35 +00:00
cd_image_hasher.cpp
cd_image_hasher.h
cd_subchannel_replacement.cpp
cd_subchannel_replacement.h
2019-11-03 14:39:25 +00:00
cd_xa.cpp
cd_xa.h
2020-01-10 03:31:12 +00:00
cpu_detect.h
2020-01-12 05:16:41 +00:00
cubeb_audio_stream.cpp
cubeb_audio_stream.h
2020-06-17 12:46:13 +00:00
dimensional_array.h
event.cpp
event.h
2020-01-10 03:31:12 +00:00
fifo_queue.h
file_system.cpp
file_system.h
2020-06-30 14:34:22 +00:00
image.cpp
image.h
gl/context.cpp
gl/context.h
2019-11-03 14:39:25 +00:00
gl/program.cpp
gl/program.h
2020-04-03 14:11:09 +00:00
gl/shader_cache.cpp
gl/shader_cache.h
2019-11-03 14:39:25 +00:00
gl/stream_buffer.cpp
gl/stream_buffer.h
gl/texture.cpp
gl/texture.h
hash_combine.h
2020-01-10 03:31:12 +00:00
heap_array.h
2019-11-29 13:36:25 +00:00
iso_reader.cpp
iso_reader.h
2019-11-03 14:39:25 +00:00
jit_code_buffer.cpp
jit_code_buffer.h
2020-01-10 03:31:12 +00:00
log.cpp
log.h
md5_digest.cpp
md5_digest.h
null_audio_stream.cpp
null_audio_stream.h
2019-11-05 09:19:20 +00:00
rectangle.h
2020-03-12 03:54:27 +00:00
progress_callback.cpp
progress_callback.h
2020-06-16 12:46:14 +00:00
scope_guard.h
2019-11-03 14:39:25 +00:00
state_wrapper.cpp
state_wrapper.h
2020-01-10 03:31:12 +00:00
string.cpp
string.h
string_util.cpp
string_util.h
timer.cpp
timer.h
timestamp.cpp
timestamp.h
2019-11-05 09:19:20 +00:00
types.h
vulkan/builders.cpp
vulkan/builders.h
vulkan/context.cpp
vulkan/context.h
vulkan/shader_cache.cpp
vulkan/shader_cache.h
vulkan/shader_compiler.cpp
vulkan/shader_compiler.h
vulkan/staging_buffer.cpp
vulkan/staging_buffer.h
vulkan/staging_texture.cpp
vulkan/staging_texture.h
vulkan/stream_buffer.cpp
vulkan/stream_buffer.h
vulkan/swap_chain.cpp
vulkan/swap_chain.h
vulkan/texture.cpp
vulkan/texture.h
vulkan/util.cpp
vulkan/util.h
2020-03-15 12:03:22 +00:00
wav_writer.cpp
2020-03-15 14:02:55 +00:00
wav_writer.h
2019-09-09 07:01:26 +00:00
)
target_include_directories(common PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
target_include_directories(common PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
2020-06-30 14:34:22 +00:00
target_link_libraries(common PRIVATE glad libcue stb Threads::Threads cubeb libchdr glslang vulkan-loader)
2019-11-03 14:39:25 +00:00
if(WIN32)
target_sources(common PRIVATE
gl/context_wgl.cpp
gl/context_wgl.h
d3d11/shader_cache.cpp
d3d11/shader_cache.h
2019-11-03 14:39:25 +00:00
d3d11/shader_compiler.cpp
d3d11/shader_compiler.h
d3d11/staging_texture.cpp
d3d11/staging_texture.h
d3d11/stream_buffer.cpp
d3d11/stream_buffer.h
d3d11/texture.cpp
d3d11/texture.h
2020-01-10 03:31:12 +00:00
windows_headers.h
2019-11-03 14:39:25 +00:00
)
target_link_libraries(common PRIVATE d3dcompiler.lib)
endif()
2020-01-10 03:31:12 +00:00
if(ANDROID)
target_link_libraries(common PRIVATE log)
endif()
if(USE_X11)
target_sources(common PRIVATE
gl/x11_window.cpp
gl/x11_window.h
)
target_compile_definitions(common PRIVATE "-DUSE_X11=1")
target_include_directories(common PRIVATE "${X11_INCLUDE_DIR}")
target_link_libraries(common PRIVATE "${X11_LIBRARIES}")
endif()
if(USE_EGL)
target_sources(common PRIVATE
gl/context_egl.cpp
gl/context_egl.h
)
target_compile_definitions(common PRIVATE "-DUSE_EGL=1")
if(USE_X11)
target_sources(common PRIVATE
gl/context_egl_x11.cpp
gl/context_egl_x11.h
)
endif()
if(ANDROID)
target_sources(common PRIVATE
gl/context_egl_android.cpp
gl/context_egl_android.h
)
endif()
endif()
if(SUPPORTS_X11)
target_sources(common PRIVATE
gl/context_glx.cpp
gl/context_glx.h
)
target_compile_definitions(common PRIVATE "-DUSE_GLX=1")
endif()
if(APPLE)
target_sources(common PRIVATE
gl/context_agl.mm
gl/context_agl.h
)
endif()