Skip to content

Commit

Permalink
license
Browse files Browse the repository at this point in the history
  • Loading branch information
a3st committed Aug 7, 2024
1 parent 442dabd commit 93634cb
Show file tree
Hide file tree
Showing 18 changed files with 720 additions and 59 deletions.
12 changes: 0 additions & 12 deletions .gitmodules

This file was deleted.

42 changes: 22 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
# Copyright © 2022-2024 Dmitriy Lukovenko. All rights reserved.

cmake_minimum_required(VERSION 3.25.1)

project(Notes VERSION 1.0.0 LANGUAGES CXX)
project(Notes
VERSION 1.0.0
DESCRIPTION "Minimalistic note editor in Markdown format"
HOMEPAGE_URL https://github.com/a3st/Notes
LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

include(FetchContent)

FetchContent_Declare(simdjson
SOURCE_DIR ${PROJECT_SOURCE_DIR}/thirdparty/simdjson
GIT_REPOSITORY https://github.com/simdjson/simdjson.git
BINARY_DIR ${CMAKE_BINARY_DIR}/thirdparty/simdjson)

FetchContent_Declare(libwebview
SOURCE_DIR ${PROJECT_SOURCE_DIR}/thirdparty/libwebview
GIT_REPOSITORY https://github.com/a3st/libwebview.git
GIT_TAG main
BINARY_DIR ${CMAKE_BINARY_DIR}/thirdparty/libwebview)

FetchContent_Declare(SQLiteCpp
SOURCE_DIR ${PROJECT_SOURCE_DIR}/thirdparty/SQLiteCpp
GIT_REPOSITORY https://github.com/SRombauts/SQLiteCpp.git
BINARY_DIR ${CMAKE_BINARY_DIR}/thirdparty/SQLiteCpp)

FetchContent_Declare(base64pp
SOURCE_DIR ${PROJECT_SOURCE_DIR}/thirdparty/base64pp
GIT_REPOSITORY https://github.com/matheusgomes28/base64pp.git
GIT_TAG main
BINARY_DIR ${CMAKE_BINARY_DIR}/thirdparty/base64pp)

FetchContent_MakeAvailable(simdjson libwebview SQLiteCpp base64pp)
Expand All @@ -33,15 +41,15 @@ add_executable(Notes
src/note.cpp)

if(WIN32)
set_target_properties(Notes
PROPERTIES
LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE"
LINK_FLAGS_RELEASE "/SUBSYSTEM:windows /ENTRY:mainCRTStartup"
LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:windows /ENTRY:mainCRTStartup"
LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:windows /ENTRY:mainCRTStartup"
)
set_target_properties(Notes
PROPERTIES
LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE"
LINK_FLAGS_RELEASE "/SUBSYSTEM:windows /ENTRY:mainCRTStartup"
LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:windows /ENTRY:mainCRTStartup"
LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:windows /ENTRY:mainCRTStartup"
)

target_sources(Notes PRIVATE app.rc)
target_sources(Notes PRIVATE app.rc)
endif()

target_include_directories(Notes PRIVATE
Expand All @@ -54,13 +62,7 @@ target_link_libraries(Notes PRIVATE
base64pp
SQLiteCpp
simdjson
libwebview_edge)

if(WIN32)
target_link_libraries(Notes PRIVATE libwebview_edge)
elseif(UNIX)
target_link_libraries(Notes PRIVATE libwebview_webkit)
endif()
libwebview)

add_custom_command(
TARGET Notes
Expand Down
695 changes: 674 additions & 21 deletions LICENSE.txt

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions include/exporter.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022-2024 Dmitriy Lukovenko. All rights reserved.

#pragma once

namespace notes
Expand Down
2 changes: 2 additions & 0 deletions include/exporters/txt.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022-2024 Dmitriy Lukovenko. All rights reserved.

#pragma once

#include "exporter.hpp"
Expand Down
6 changes: 4 additions & 2 deletions include/note.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022-2024 Dmitriy Lukovenko. All rights reserved.

#pragma once

namespace notes
Expand All @@ -9,8 +11,8 @@ namespace notes
Note(uint32_t const noteID, std::string_view const noteName, std::string_view const noteData);

/*!
@brief Present note in JSON format
@return JSON formatted string
\brief Presents note in JSON format
\return JSON formatted string
*/
std::string dump() const;

Expand Down
2 changes: 2 additions & 0 deletions include/note_storage.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022-2024 Dmitriy Lukovenko. All rights reserved.

#pragma once

#include "note.hpp"
Expand Down
2 changes: 2 additions & 0 deletions include/precompiled.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022-2024 Dmitriy Lukovenko. All rights reserved.

#pragma once

#include <iostream>
Expand Down
2 changes: 2 additions & 0 deletions include/view_model.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022-2024 Dmitriy Lukovenko. All rights reserved.

#pragma once

#include "note_storage.hpp"
Expand Down
2 changes: 2 additions & 0 deletions src/exporters/txt.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022-2024 Dmitriy Lukovenko. All rights reserved.

#include "exporters/txt.hpp"
#include "precompiled.hpp"

Expand Down
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022-2024 Dmitriy Lukovenko. All rights reserved.

#include "precompiled.hpp"
#include "view_model.hpp"
#include <webview.hpp>
Expand Down
2 changes: 2 additions & 0 deletions src/note.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022-2024 Dmitriy Lukovenko. All rights reserved.

#include "note.hpp"
#include "precompiled.hpp"

Expand Down
2 changes: 2 additions & 0 deletions src/note_storage.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022-2024 Dmitriy Lukovenko. All rights reserved.

#include "note_storage.hpp"
#include "precompiled.hpp"
#include <base64pp/base64pp.h>
Expand Down
2 changes: 2 additions & 0 deletions src/view_model.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022-2024 Dmitriy Lukovenko. All rights reserved.

#include "view_model.hpp"
#include "precompiled.hpp"

Expand Down
1 change: 0 additions & 1 deletion thirdparty/SQLiteCpp
Submodule SQLiteCpp deleted from bcb4c7
1 change: 0 additions & 1 deletion thirdparty/base64pp
Submodule base64pp deleted from 432c94
1 change: 0 additions & 1 deletion thirdparty/libwebview
Submodule libwebview deleted from f30c6c
1 change: 0 additions & 1 deletion thirdparty/simdjson
Submodule simdjson deleted from ee8515

0 comments on commit 93634cb

Please sign in to comment.