add emu.cmake for emulator
This commit is contained in:
@@ -17,18 +17,18 @@ set(
|
|||||||
if (YAZE_BUILD_APP)
|
if (YAZE_BUILD_APP)
|
||||||
include(app/app.cmake)
|
include(app/app.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (YAZE_BUILD_EMU)
|
if (YAZE_BUILD_EMU)
|
||||||
include(app/emu/CMakeLists.txt)
|
include(app/emu/emu.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (YAZE_BUILD_Z3ED)
|
if (YAZE_BUILD_Z3ED)
|
||||||
include(cli/z3ed.cmake)
|
include(cli/z3ed.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (YAZE_BUILD_PYTHON)
|
if (YAZE_BUILD_PYTHON)
|
||||||
include(py/yaze_py.cmake)
|
include(py/yaze_py.cmake)
|
||||||
endif()
|
endif()
|
||||||
|
if (YAZE_BUILD_TESTS)
|
||||||
|
include(test/CMakeLists.txt)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
target_compile_definitions(yaze PRIVATE "linux")
|
target_compile_definitions(yaze PRIVATE "linux")
|
||||||
@@ -63,55 +63,53 @@ set_target_properties(yaze
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include(test/CMakeLists.txt)
|
|
||||||
|
|
||||||
if (YAZE_BUILD_LIB)
|
|
||||||
# Yaze C API
|
# Yaze C API
|
||||||
add_library(
|
if (YAZE_BUILD_LIB)
|
||||||
yaze_c SHARED
|
add_library(
|
||||||
./yaze.cc
|
yaze_c SHARED
|
||||||
app/rom.cc
|
./yaze.cc
|
||||||
${YAZE_APP_EMU_SRC}
|
app/rom.cc
|
||||||
${YAZE_APP_CORE_SRC}
|
${YAZE_APP_EMU_SRC}
|
||||||
${YAZE_APP_EDITOR_SRC}
|
${YAZE_APP_CORE_SRC}
|
||||||
${YAZE_APP_GFX_SRC}
|
${YAZE_APP_EDITOR_SRC}
|
||||||
${YAZE_APP_ZELDA3_SRC}
|
${YAZE_APP_GFX_SRC}
|
||||||
${YAZE_GUI_SRC}
|
${YAZE_APP_ZELDA3_SRC}
|
||||||
${IMGUI_SRC}
|
${YAZE_GUI_SRC}
|
||||||
${IMGUI_TEST_ENGINE_SOURCES}
|
${IMGUI_SRC}
|
||||||
)
|
${IMGUI_TEST_ENGINE_SOURCES}
|
||||||
|
)
|
||||||
|
|
||||||
target_include_directories(
|
target_include_directories(
|
||||||
yaze_c PUBLIC
|
yaze_c PUBLIC
|
||||||
lib/
|
lib/
|
||||||
app/
|
app/
|
||||||
${CMAKE_SOURCE_DIR}/src/
|
${CMAKE_SOURCE_DIR}/src/
|
||||||
${PNG_INCLUDE_DIRS}
|
${PNG_INCLUDE_DIRS}
|
||||||
${SDL2_INCLUDE_DIR}
|
${SDL2_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
yaze_c PRIVATE
|
yaze_c PRIVATE
|
||||||
${ABSL_TARGETS}
|
${ABSL_TARGETS}
|
||||||
${SDL_TARGETS}
|
${SDL_TARGETS}
|
||||||
${PNG_LIBRARIES}
|
${PNG_LIBRARIES}
|
||||||
${CMAKE_DL_LIBS}
|
${CMAKE_DL_LIBS}
|
||||||
ImGuiTestEngine
|
ImGuiTestEngine
|
||||||
ImGui
|
ImGui
|
||||||
)
|
)
|
||||||
|
|
||||||
if (YAZE_INSTALL_LIB)
|
if (YAZE_INSTALL_LIB)
|
||||||
install(TARGETS yaze_c
|
install(TARGETS yaze_c
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
LIBRARY DESTINATION lib
|
LIBRARY DESTINATION lib
|
||||||
ARCHIVE DESTINATION lib/static)
|
ARCHIVE DESTINATION lib/static)
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES
|
FILES
|
||||||
yaze.h
|
yaze.h
|
||||||
base/sprite.h
|
base/sprite.h
|
||||||
base/snes_color.h
|
base/snes_color.h
|
||||||
base/overworld.h
|
base/overworld.h
|
||||||
DESTINATION include)
|
DESTINATION include)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
Reference in New Issue
Block a user