Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cmake-single-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
container:
image: mattgomes28/jammy-cpp:0.0.0
image: mattgomes28/jammy-cpp:0.0.1
options: --user 1001

steps:
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ option(BUILD_PROFILER "Build profiling for the instruction handlers")

add_subdirectory(emulator)
add_subdirectory(emulator_app)
add_subdirectory(ui)

if (BUILD_PROFILER)
add_subdirectory(profiler)
Expand Down
8 changes: 4 additions & 4 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@
"hidden": true,
"generator": "Ninja",
"cacheVariables": {
"CMAKE_C_COMPILER": "clang-17",
"CMAKE_CXX_COMPILER": "clang++-17",
"CMAKE_C_COMPILER": "clang-19",
"CMAKE_CXX_COMPILER": "clang++-19",
"CMAKE_CXX_FLAGS_INIT": "$env{CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -pedantic",
"CMAKE_CXX_SCAN_FOR_MODULES": true,
"CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS": "/usr/bin/clang-scan-deps-17"
"CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS": "/usr/bin/clang-scan-deps-19"
}
},
{
Expand Down Expand Up @@ -115,7 +115,7 @@
"binaryDir": "${sourceDir}/build/unix-deb-ninja",
"inherits": ["unix-ninja", "deb"],
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-O0 --coverage -g -fsanitize=address",
"CMAKE_CXX_FLAGS": "-O0 -g -fsanitize=address",
"CMAKE_INSTALL_PREFIX": "${sourceDir}/build/unix-deb-ninja/install",
"CLOCK_SPEED_MHZ": "3.58",
"BUILD_PROFILER": true
Expand Down
54 changes: 52 additions & 2 deletions dependencies/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

file(
DOWNLOAD
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.40.2/CPM.cmake
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.40.5/CPM.cmake
${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
EXPECTED_HASH SHA256=c8cdc32c03816538ce22781ed72964dc864b2a34a310d3b7104812a5ca2d835d
EXPECTED_HASH SHA256=c46b876ae3b9f994b4f05a4c15553e0485636862064f1fcc9d8b4f832086bc5d
)
include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)

Expand All @@ -14,6 +14,55 @@ CPMAddPackage(
VERSION 5.0
)

CPMAddPackage(
NAME raylib_imgui
GITHUB_REPOSITORY raylib-extras/rlImGui
GIT_TAG 583d4fea67e67d431319974f0625f680d3840dfb
VERSION 583d4fea67e67d431319974f0625f680d3840dfb
)

add_library(raylib_imgui)
add_library(raylib::imgui ALIAS raylib_imgui)
target_sources(raylib_imgui PRIVATE
${raylib_imgui_SOURCE_DIR}/rlImGui.cpp
${raylib_imgui_SOURCE_DIR}/rlImGui.h
${raylib_imgui_SOURCE_DIR}/rlImGuiColors.h)
target_include_directories(raylib_imgui PUBLIC ${raylib_imgui_SOURCE_DIR})
target_link_libraries(raylib_imgui PUBLIC raylib::raylib imgui::imgui)

CPMAddPackage(
NAME imgui
VERSION 1.91.1
GITHUB_REPOSITORY ocornut/imgui
DOWNLOAD_ONLY TRUE
)

# CMakeLists.txt from https://gist.githubusercontent.com/rokups/f771217b2d530d170db5cb1e08e9a8f4
file(
DOWNLOAD
"https://gist.githubusercontent.com/rokups/f771217b2d530d170db5cb1e08e9a8f4/raw/4c2c14374ab878ca2f45daabfed4c156468e4e27/CMakeLists.txt"
"${imgui_SOURCE_DIR}/CMakeLists.txt"
EXPECTED_HASH SHA256=fd62f69364ce13a4f7633a9b50ae6672c466bcc44be60c69c45c0c6e225bb086
)
# Options
set(IMGUI_EXAMPLES FALSE)
set(IMGUI_DEMO FALSE)
set(IMGUI_ENABLE_STDLIB_SUPPORT TRUE)
# FreeType (https://github.com/cpm-cmake/CPM.cmake/wiki/More-Snippets#freetype)
set(FREETYPE_FOUND TRUE)
set(FREETYPE_INCLUDE_DIRS "")
set(FREETYPE_LIBRARIES Freetype::Freetype)

file(GLOB IMGUI_SRC
${imgui_SOURCE_DIR}/*.c
${imgui_SOURCE_DIR}/*.cpp
)

add_library(imgui)
add_library(imgui::imgui ALIAS imgui)
target_sources(imgui PRIVATE ${IMGUI_SRC})
target_include_directories(imgui PUBLIC ${imgui_SOURCE_DIR})

CPMAddPackage(
NAME googletest
GITHUB_REPOSITORY google/googletest
Expand All @@ -32,6 +81,7 @@ CPMAddPackage(
GITHUB_REPOSITORY fmtlib/fmt
)


# Aliases
add_library(gtest::gtest ALIAS gtest)
add_library(gtest::gtest_main ALIAS gtest_main)
Expand Down
22 changes: 11 additions & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN apt-get update \
&& apt-get autoremove --purge -y \
&& rm -rf /var/lib/apt/lists/*

# Install the LLVM 17 tools
# Install the LLVM 19 tools
RUN apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
gnupg \
Expand All @@ -41,17 +41,17 @@ RUN apt-get update \
wget \
&& wget https://apt.llvm.org/llvm.sh \
&& chmod +x llvm.sh \
&& ./llvm.sh 17 \
&& ./llvm.sh 19 \
&& apt-get install -y --no-install-recommends --no-install-suggests \
clang-format-17 \
clang-tidy-17 \
clang-tools-17 \
libclang-rt-17-dev \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 10 \
&& update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-17 10 \
&& update-alternatives --install /usr/bin/clang-scan-deps clang-scan-deps /usr/bin/clang-scan-deps-17 10 \
&& update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-17 10 \
&& update-alternatives --install /usr/bin/run-clang-tidy run-clang-tidy /usr/bin/run-clang-tidy-17 10 \
clang-format-19 \
clang-tidy-19 \
clang-tools-19 \
libclang-rt-19-dev \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 10 \
&& update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-19 10 \
&& update-alternatives --install /usr/bin/clang-scan-deps clang-scan-deps /usr/bin/clang-scan-deps-19 10 \
&& update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-19 10 \
&& update-alternatives --install /usr/bin/run-clang-tidy run-clang-tidy /usr/bin/run-clang-tidy-19 10 \
&& rm llvm.sh \
&& apt-get autoremove -y \
gnupg \
Expand Down
1 change: 1 addition & 0 deletions emulator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ else()
endif()

target_link_libraries(emulator PRIVATE fmt::fmt)
add_library(emulator::emulator ALIAS emulator)
Loading