2019-12-17 14:46:50 +00:00
|
|
|
include(FindPkgConfig)
|
|
|
|
|
2021-02-25 16:56:36 +00:00
|
|
|
find_package(SDL2 REQUIRED)
|
|
|
|
pkg_search_module(SDL2_IMAGE REQUIRED SDL2_image)
|
|
|
|
pkg_search_module(GLES2 REQUIRED glesv2)
|
|
|
|
set(IMGUI_PATH "imgui/imgui")
|
2021-02-28 17:02:30 +00:00
|
|
|
set(IMGUI_CLUB_PATH "imgui/imgui_club")
|
2021-02-25 16:56:36 +00:00
|
|
|
|
2021-02-06 16:55:08 +00:00
|
|
|
add_executable(sa2)
|
|
|
|
|
2021-01-12 12:52:26 +00:00
|
|
|
set(SOURCE_FILES
|
2019-12-17 14:46:50 +00:00
|
|
|
main.cpp
|
2020-10-15 12:55:27 +01:00
|
|
|
gamepad.cpp
|
2020-10-20 15:32:45 +01:00
|
|
|
sdirectsound.cpp
|
2020-11-14 09:29:21 +00:00
|
|
|
utils.cpp
|
2021-01-10 11:47:44 +00:00
|
|
|
sdlframe.cpp
|
2021-02-06 16:55:08 +00:00
|
|
|
renderer/sdlrendererframe.cpp
|
2019-12-17 14:46:50 +00:00
|
|
|
)
|
|
|
|
|
2021-01-12 12:52:26 +00:00
|
|
|
set(HEADER_FILES
|
|
|
|
gamepad.h
|
|
|
|
sdirectsound.h
|
|
|
|
utils.h
|
2021-01-10 11:47:44 +00:00
|
|
|
sdlframe.h
|
2021-02-06 16:55:08 +00:00
|
|
|
renderer/sdlrendererframe.h
|
2021-01-12 12:52:26 +00:00
|
|
|
)
|
|
|
|
|
2019-12-17 14:46:50 +00:00
|
|
|
|
|
|
|
target_compile_features(sa2 PUBLIC cxx_std_17)
|
|
|
|
|
|
|
|
target_include_directories(sa2 PRIVATE
|
|
|
|
${SDL2_INCLUDE_DIRS}
|
2020-11-21 09:35:15 +00:00
|
|
|
${SDL2_IMAGE_INCLUDE_DIRS}
|
2019-12-17 14:46:50 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(sa2 PRIVATE
|
|
|
|
${SDL2_LIBRARIES}
|
2020-11-21 09:35:15 +00:00
|
|
|
${SDL2_IMAGE_LIBRARIES}
|
2021-02-25 16:56:36 +00:00
|
|
|
${GLES2_LIBRARIES}
|
2019-12-17 14:46:50 +00:00
|
|
|
appleii
|
2020-10-09 19:13:42 +01:00
|
|
|
common2
|
2019-12-17 14:46:50 +00:00
|
|
|
)
|
2019-12-17 14:51:41 +00:00
|
|
|
|
2021-02-06 16:55:08 +00:00
|
|
|
target_sources(sa2 PRIVATE
|
|
|
|
${SOURCE_FILES}
|
|
|
|
${HEADER_FILES}
|
|
|
|
)
|
|
|
|
|
2021-02-25 16:56:36 +00:00
|
|
|
target_sources(sa2 PRIVATE
|
|
|
|
imgui/sdlimguiframe.cpp
|
|
|
|
imgui/image.cpp
|
|
|
|
imgui/settingshelper.cpp
|
2021-03-06 17:41:32 +00:00
|
|
|
imgui/sdlsettings.cpp
|
2021-02-25 16:56:36 +00:00
|
|
|
|
|
|
|
imgui/sdlimguiframe.h
|
|
|
|
imgui/image.h
|
|
|
|
imgui/settingshelper.h
|
2021-03-06 17:41:32 +00:00
|
|
|
imgui/sdlsettings.h
|
2021-02-25 16:56:36 +00:00
|
|
|
imgui/imconfig.h
|
|
|
|
imgui/gles.h
|
|
|
|
|
|
|
|
${IMGUI_PATH}/imgui.h
|
|
|
|
${IMGUI_PATH}/imgui.cpp
|
|
|
|
${IMGUI_PATH}/imgui_demo.cpp
|
|
|
|
${IMGUI_PATH}/imgui_draw.cpp
|
|
|
|
${IMGUI_PATH}/imgui_tables.cpp
|
|
|
|
${IMGUI_PATH}/imgui_widgets.cpp
|
|
|
|
${IMGUI_PATH}/backends/imgui_impl_sdl.cpp
|
|
|
|
${IMGUI_PATH}/backends/imgui_impl_opengl3.cpp
|
2021-03-06 18:00:07 +00:00
|
|
|
|
|
|
|
${IMGUI_CLUB_PATH}/imgui_memory_editor/imgui_memory_editor.h
|
2021-02-25 16:56:36 +00:00
|
|
|
)
|
2021-02-06 16:55:08 +00:00
|
|
|
|
2021-02-25 16:56:36 +00:00
|
|
|
target_include_directories(sa2 PRIVATE
|
|
|
|
${IMGUI_PATH}
|
|
|
|
${IMGUI_PATH}/backends
|
2021-02-28 17:02:30 +00:00
|
|
|
${IMGUI_CLUB_PATH}/imgui_memory_editor
|
2021-02-25 16:56:36 +00:00
|
|
|
)
|
2021-02-06 16:55:08 +00:00
|
|
|
|
2021-02-25 16:56:36 +00:00
|
|
|
target_compile_definitions(sa2 PRIVATE
|
|
|
|
IMGUI_IMPL_OPENGL_ES2
|
|
|
|
IMGUI_USER_CONFIG="frontends/sdl/imgui/imconfig.h"
|
|
|
|
)
|
2021-02-06 16:55:08 +00:00
|
|
|
|
2020-10-09 09:46:15 +01:00
|
|
|
install(TARGETS sa2
|
|
|
|
DESTINATION bin)
|