Skip to content
This repository was archived by the owner on Jan 22, 2026. It is now read-only.
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
76 changes: 45 additions & 31 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,55 +1,69 @@
cmake_minimum_required(VERSION 3.0.0)
cmake_minimum_required(VERSION 3.13)
set(CMAKE_TOOLCHAIN_FILE "C:\\vcpkg\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake" )
project(Cadera VERSION 0.0.1)
project(Cadera VERSION 0.1.0)

include(CTest)
enable_testing()

#=========================================
# Targets
#=========================================
add_executable(CaderaApp src/Cadera.cpp
src/Selection.cpp
src/Callbacks.cpp
src/Model.cpp
src/Main.cpp

)


add_subdirectory(src/render)
add_subdirectory(src/sketch)
add_subdirectory(src/ux)

add_executable(Cadera src/Cadera.cpp
src/CADRender.cpp
src/TextRender.cpp
src/RenderUtil.cpp
src/Selection.cpp
src/Camera.cpp
src/Callbacks.cpp
src/gui.cpp
src/Sketch.cpp
src/Sketcher.cpp
src/SketchSolver.cpp
src/Point.cpp
src/Model.cpp
src/Feature.cpp
src/Relation.cpp
src/grid.cpp
src/Main.cpp


set_target_properties(CaderaApp PROPERTIES
OUTPUT_NAME CaderaApp
EXPORT_NAME CaderaApp
)


add_executable(tester test/tester.cpp)
add_test(tester tester)
target_compile_definitions(CaderaApp PUBLIC)

target_precompile_headers(Cadera PRIVATE include/pch.hpp)
target_include_directories(Cadera PRIVATE include/)
#=========================================
# Precompiled Headers / Include Directories
#=========================================
target_precompile_headers(CaderaApp PRIVATE src/pch.hpp)

target_include_directories(CaderaApp PRIVATE src/)

#=========================================
# Libraries
#=========================================
find_package(Vulkan REQUIRED)
target_link_libraries(Cadera PRIVATE Vulkan::Vulkan)
target_link_libraries(CaderaApp PRIVATE Vulkan::Vulkan)

find_package(glfw3 CONFIG REQUIRED)
target_link_libraries(Cadera PRIVATE glfw)
target_link_libraries(CaderaApp PRIVATE glfw)

find_package(Stb REQUIRED)
target_include_directories(Cadera PRIVATE ${Stb_INCLUDE_DIR})
target_include_directories(CaderaApp PRIVATE ${Stb_INCLUDE_DIR})

find_package(Microsoft.GSL CONFIG REQUIRED)
target_link_libraries(Cadera PRIVATE Microsoft.GSL::GSL)
target_link_libraries(CaderaApp PRIVATE Microsoft.GSL::GSL)

find_package(imgui CONFIG REQUIRED)
target_link_libraries(Cadera PRIVATE imgui::imgui)
target_link_libraries(CaderaApp PRIVATE imgui::imgui)


#=========================================
# Testing
#=========================================
include_directories(test)



#=========================================
# Packaging
#=========================================
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
36 changes: 0 additions & 36 deletions include/Canvas.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion include/Cadera.hpp → src/Cadera.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "gui.hpp"
#include "ux/gui.hpp"



Expand Down
35 changes: 0 additions & 35 deletions src/Canvas.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion src/Main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "pch.hpp"
#include "Cadera.hpp"
#include <gsl/gsl>
#include <CADRender.hpp>



VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE
Expand Down
4 changes: 2 additions & 2 deletions include/Model.hpp → src/Model.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "TextRender.hpp"
#include "grid.hpp"
#include "render/TextRender.hpp"
#include "render/grid.hpp"

namespace CADERA_APP_NAMESPACE {

Expand Down
2 changes: 1 addition & 1 deletion include/Selection.hpp → src/Selection.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "Sketch.hpp"
#include "sketch/SketchSolver.hpp"


namespace CADERA_APP_NAMESPACE {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion include/CADRender.hpp → src/render/CADRender.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "callbacks.hpp"
#include "Camera.hpp"
#include "SketchSolver.hpp"




Expand Down
11 changes: 11 additions & 0 deletions src/render/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 3.13)



target_sources(CaderaApp PRIVATE ${CMAKE_CURRENT_LIST_DIR}/CADRender.cpp
${CMAKE_CURRENT_LIST_DIR}/Camera.cpp
${CMAKE_CURRENT_LIST_DIR}/RenderUtil.cpp
${CMAKE_CURRENT_LIST_DIR}/TextRender.cpp
${CMAKE_CURRENT_LIST_DIR}/Grid.cpp
)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion include/grid.hpp → src/render/grid.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include "RenderUtil.hpp"
#include "render/RenderUtil.hpp"

namespace CADERA_APP_NAMESPACE {

Expand Down
12 changes: 12 additions & 0 deletions src/sketch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.13)



target_sources(CaderaApp PRIVATE ${CMAKE_CURRENT_LIST_DIR}/Relation.cpp
${CMAKE_CURRENT_LIST_DIR}/Feature.cpp
${CMAKE_CURRENT_LIST_DIR}/Sketch.cpp
${CMAKE_CURRENT_LIST_DIR}/Sketcher.cpp
${CMAKE_CURRENT_LIST_DIR}/SketchSolver.cpp
${CMAKE_CURRENT_LIST_DIR}/Point.cpp
)

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions src/sketch/pch.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <cassert>
#include <iostream>
#include <map>
#include <vector>
#include <bitset>
#include <list>
#include <set>
#include <fstream>
#include <chrono>
6 changes: 6 additions & 0 deletions src/ux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.13)


target_sources(CaderaApp PRIVATE ${CMAKE_CURRENT_LIST_DIR}/gui.cpp

)
2 changes: 1 addition & 1 deletion src/gui.cpp → src/ux/gui.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "pch.hpp"
#include "../pch.hpp"
#include "gui.hpp"

namespace CADERA_APP_NAMESPACE {
Expand Down
2 changes: 1 addition & 1 deletion include/gui.hpp → src/ux/gui.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "CADRender.hpp"
#include "../render/CADRender.hpp"

namespace CADERA_APP_NAMESPACE {
namespace gui {
Expand Down
6 changes: 6 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cmake_minimum_required(VERSION 3.13)


add_executable(tester test/tester.cpp)
add_test(tester tester)