Cleanup CMakeLists
This commit is contained in:
@@ -28,9 +28,14 @@ find_package(PNG REQUIRED)
|
|||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
find_package(GLEW REQUIRED)
|
find_package(GLEW REQUIRED)
|
||||||
|
|
||||||
|
# Asar Assembly ---------------------------------------------------------------
|
||||||
|
add_subdirectory(src/lib/asar/src)
|
||||||
|
get_target_property(ASAR_INCLUDE_DIR asar-static INCLUDE_DIRECTORIES)
|
||||||
|
include_directories(${ASAR_INCLUDE_DIR})
|
||||||
|
add_definitions(-Dstricmp=strcasecmp)
|
||||||
|
|
||||||
# Project Files
|
# Project Files
|
||||||
add_subdirectory(src/lib/abseil-cpp)
|
add_subdirectory(src/lib/abseil-cpp)
|
||||||
add_subdirectory(src/lib/SDL)
|
add_subdirectory(src/lib/SDL)
|
||||||
add_subdirectory(src/lib/asar/src)
|
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
include_directories(lib/cmake)
|
|
||||||
|
|
||||||
# gui libraries ---------------------------------------------------------------
|
# gui libraries ---------------------------------------------------------------
|
||||||
set(IMGUI_PATH "lib/imgui")
|
set(IMGUI_PATH "lib/imgui")
|
||||||
file(GLOB IMGUI_SOURCES ${IMGUI_PATH}/*.cpp)
|
file(GLOB IMGUI_SOURCES ${IMGUI_PATH}/*.cpp)
|
||||||
@@ -23,11 +21,18 @@ target_include_directories(ImGuiColorTextEdit PUBLIC ${IMGUI_PATH})
|
|||||||
target_compile_definitions(ImGuiColorTextEdit PUBLIC
|
target_compile_definitions(ImGuiColorTextEdit PUBLIC
|
||||||
IMGUI_IMPL_OPENGL_LOADER_CUSTOM=<SDL2/SDL_opengl.h> GL_GLEXT_PROTOTYPES=1)
|
IMGUI_IMPL_OPENGL_LOADER_CUSTOM=<SDL2/SDL_opengl.h> GL_GLEXT_PROTOTYPES=1)
|
||||||
|
|
||||||
# asar assembly ---------------------------------------------------------------
|
set(
|
||||||
get_target_property(ASAR_INCLUDE_DIR asar-static INCLUDE_DIRECTORIES)
|
IMGUI_SRC
|
||||||
include_directories(${ASAR_INCLUDE_DIR})
|
${IMGUI_PATH}/imgui.cpp
|
||||||
|
${IMGUI_PATH}/imgui_demo.cpp
|
||||||
# executable linkage ----------------------------------------------------------
|
${IMGUI_PATH}/imgui_draw.cpp
|
||||||
|
${IMGUI_PATH}/imgui_widgets.cpp
|
||||||
|
${IMGUI_PATH}/backends/imgui_impl_sdl.cpp
|
||||||
|
${IMGUI_PATH}/backends/imgui_impl_sdlrenderer.cpp
|
||||||
|
${IMGUI_PATH}/misc/cpp/imgui_stdlib.cpp
|
||||||
|
${IMGUI_FILE_DLG_PATH}/ImGuiFileDialog.cpp
|
||||||
|
${IMGUI_COLOR_TEXT_EDIT_PATH}/TextEditor.cpp
|
||||||
|
)
|
||||||
|
|
||||||
set(
|
set(
|
||||||
YAZE_APP_CORE_SRC
|
YAZE_APP_CORE_SRC
|
||||||
@@ -60,34 +65,37 @@ set(
|
|||||||
app/zelda3/screen.cc
|
app/zelda3/screen.cc
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(
|
||||||
|
YAZE_APP_ASM_SRC
|
||||||
|
app/asm/script.h
|
||||||
|
)
|
||||||
|
|
||||||
|
set(
|
||||||
|
YAZE_GUI_SRC
|
||||||
|
gui/canvas.cc
|
||||||
|
gui/input.cc
|
||||||
|
gui/style.cc
|
||||||
|
gui/widgets.cc
|
||||||
|
)
|
||||||
|
|
||||||
add_executable(
|
add_executable(
|
||||||
yaze
|
yaze
|
||||||
yaze.cc
|
yaze.cc
|
||||||
|
app/rom.cc
|
||||||
|
${YAZE_APP_ASM_SRC}
|
||||||
${YAZE_APP_CORE_SRC}
|
${YAZE_APP_CORE_SRC}
|
||||||
${YAZE_APP_EDITOR_SRC}
|
${YAZE_APP_EDITOR_SRC}
|
||||||
${YAZE_APP_GFX_SRC}
|
${YAZE_APP_GFX_SRC}
|
||||||
${YAZE_APP_ZELDA3_SRC}
|
${YAZE_APP_ZELDA3_SRC}
|
||||||
app/rom.cc
|
${YAZE_GUI_SRC}
|
||||||
gui/canvas.cc
|
${IMGUI_SRC}
|
||||||
gui/input.cc
|
|
||||||
gui/style.cc
|
|
||||||
gui/widgets.cc
|
|
||||||
# GUI libraries
|
|
||||||
${IMGUI_PATH}/imgui.cpp
|
|
||||||
${IMGUI_PATH}/imgui_demo.cpp
|
|
||||||
${IMGUI_PATH}/imgui_draw.cpp
|
|
||||||
${IMGUI_PATH}/imgui_widgets.cpp
|
|
||||||
${IMGUI_PATH}/backends/imgui_impl_sdl.cpp
|
|
||||||
${IMGUI_PATH}/backends/imgui_impl_sdlrenderer.cpp
|
|
||||||
${IMGUI_PATH}/misc/cpp/imgui_stdlib.cpp
|
|
||||||
${IMGUI_FILE_DLG_PATH}/ImGuiFileDialog.cpp
|
|
||||||
${IMGUI_COLOR_TEXT_EDIT_PATH}/TextEditor.cpp
|
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
yaze PUBLIC
|
yaze PUBLIC
|
||||||
lib/
|
lib/
|
||||||
app/
|
app/
|
||||||
|
${ASAR_INCLUDE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/src/
|
${CMAKE_SOURCE_DIR}/src/
|
||||||
${PNG_INCLUDE_DIRS}
|
${PNG_INCLUDE_DIRS}
|
||||||
${SDL2_INCLUDE_DIR}
|
${SDL2_INCLUDE_DIR}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ add_executable(
|
|||||||
yaze_test.cc
|
yaze_test.cc
|
||||||
rom_test.cc
|
rom_test.cc
|
||||||
../src/app/rom.cc
|
../src/app/rom.cc
|
||||||
|
../src/app/asm/script.cc
|
||||||
../src/app/gfx/bitmap.cc
|
../src/app/gfx/bitmap.cc
|
||||||
../src/app/gfx/snes_tile.cc
|
../src/app/gfx/snes_tile.cc
|
||||||
../src/app/gfx/snes_palette.cc
|
../src/app/gfx/snes_palette.cc
|
||||||
@@ -43,6 +44,7 @@ target_link_libraries(
|
|||||||
absl::raw_logging_internal
|
absl::raw_logging_internal
|
||||||
SDL2::SDL2
|
SDL2::SDL2
|
||||||
${OPENGL_LIBRARIES}
|
${OPENGL_LIBRARIES}
|
||||||
|
asar-static
|
||||||
gmock_main
|
gmock_main
|
||||||
gmock
|
gmock
|
||||||
gtest_main
|
gtest_main
|
||||||
|
|||||||
Reference in New Issue
Block a user