drogonCMS-cmake #28

Merged
sharpetronics merged 2 commits from drogonCMS-cmake into master 2024-02-25 22:14:16 -05:00
3 changed files with 14 additions and 13 deletions

View File

@ -27,6 +27,7 @@
# and oldest tested versions of CMake. This will ensure # and oldest tested versions of CMake. This will ensure
# you pick up the best policies. # you pick up the best policies.
cmake_minimum_required(VERSION 3.1...3.28) cmake_minimum_required(VERSION 3.1...3.28)
file(GLOB_RECURSE SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "src/*.c")
# If you set any CMAKE_ variables, that can go here. # If you set any CMAKE_ variables, that can go here.
# (But usually don't do this, except maybe for C++ standard) # (But usually don't do this, except maybe for C++ standard)
@ -55,7 +56,7 @@ project(
) )
# Adding something we can run - Output name matches target name # Adding something we can run - Output name matches target name
add_executable(DrogonCMS src/base.c) add_executable(DrogonCMS ${SOURCES})
#=============================================================================== #===============================================================================
# Setting compilation flags for various compilers and build types: # Setting compilation flags for various compilers and build types:
@ -154,7 +155,7 @@ include_directories(${GTK4_INCLUDE_DIRS} ${ADW_INCLUDE_DIRS})
link_directories(${GTK4_LIBRARY_DIRS} ${ADW_LIBRARY_DIRS}) link_directories(${GTK4_LIBRARY_DIRS} ${ADW_LIBRARY_DIRS})
add_definitions(${GTK4_CFLAGS_OTHER} ${ADW_CFLAGS_OTHER}) add_definitions(${GTK4_CFLAGS_OTHER} ${ADW_CFLAGS_OTHER})
# Include drogon source code locally # Include vendor source code locally
add_subdirectory(vendors/api-server/) add_subdirectory(vendors/api-server/)
add_subdirectory(vendors/simple-reverse-proxy/) add_subdirectory(vendors/simple-reverse-proxy/)

View File

@ -11,7 +11,7 @@ This is a Drogon Content Management System(CMS).
- Lightning Fast Architecture - Lightning Fast Architecture
- Headless CMS Ready for Site Generators - Headless CMS Ready for Site Generators
- Lightweight Reverse Proxy Security - Lightweight Reverse Proxy Security
- Database Ready - Database Ready for SQLite3 & PostgreSQL 15
- Custom API Configurations - Custom API Configurations
- C Package Manager (CPM) - C Package Manager (CPM)
- Excellent Documentation - Excellent Documentation
@ -53,7 +53,7 @@ Requests/sec: 115151.94
Transfer/sec: 78.74MB Transfer/sec: 78.74MB
``` ```
### Getting a json token with web sockets and drogon proxy on 2 IO threads. ### Getting a JSON token with web sockets and Drogon proxy on 2 IO threads.
``` ```
wrk -c200 -d5 -t2 ws://localhost:8088/get-token wrk -c200 -d5 -t2 ws://localhost:8088/get-token
Running 5s test @ ws://localhost:8088/get-token Running 5s test @ ws://localhost:8088/get-token
@ -70,20 +70,21 @@ Transfer/sec: 21.24MB
### Developer Dependency Requirements ### Developer Dependency Requirements
* GCC (GNU C/C++ Compiler) >= 13.2.1 * GCC (GNU C/C++ Compiler) >= 13.2.1
* PostgreSQL >= 15.1(*Priority*) or SQLite3(*Default*) >= 3.43.1 [SEE 3RD PARTY SITE DEPENDENCIES]
* CMake >= 3.28 * CMake >= 3.28
* Drogon >= 1.9.1 [SEE REQUIREMENTS] * Drogon >= 1.9.1 [SEE 3RD PARTY SITE DEPENDENCIES]
* Pkg-Config >= 1.8.1 * Pkg-Config >= 1.8.1
* Gtk4 >= 4.0 * Gtk4 >= 4.0
* Adwaita >= 1.3.5 * Adwaita >= 1.3.5
* OpenSSL >= 3.1.2 * OpenSSL >= 3.1.2
* *Optional* PostgreSQL Database(*Default*) >= 2.39 * *Optional* Cambalache >= 0.14 (Gtk4 Editor) [SEE 3RD PARTY SITE DEPENDENCIES]
* *Optional* Cambalache >= 0.14 (Gtk4 Editor) [SEE REQUIREMENTS]
* *Optional* Geany IDE >= 1.38 * *Optional* Geany IDE >= 1.38
* CLI Experience * CLI Experience
* Git/Github Experience
*Note: This has been built and tested on Arch Linux* *Note: This has been built and tested on Arch Linux*
### Steps to Build DrogonCMS from Source Code ### Steps to Build *DrogonCMS* from Source Code
0. Clone the repository `git clone https://git.sharpetronics.com/sharpetronics/DrogonCMS` and `cd DrogonCMS/` 0. Clone the repository `git clone https://git.sharpetronics.com/sharpetronics/DrogonCMS` and `cd DrogonCMS/`
1. *optional* checkout correct branch e.g. `git checkout drogonCMS-cmake` 1. *optional* checkout correct branch e.g. `git checkout drogonCMS-cmake`
@ -93,7 +94,7 @@ Transfer/sec: 21.24MB
### Requirements ### Requirements
Drogon framework compile/build dependencies. *Drogon* framework compile/build dependencies.
* Drogon >= 1.9.1 https://github.com/drogonframework/drogon/wiki/ENG-02-Installation#System-Preparation-Examples * Drogon >= 1.9.1 https://github.com/drogonframework/drogon/wiki/ENG-02-Installation#System-Preparation-Examples
### Recommendations ### Recommendations
@ -106,7 +107,7 @@ An optional recommendation is Geany IDE.
### IDE build commands via Geany `Build -> Set Build Commands` ### IDE build commands via Geany `Build -> Set Build Commands`
#### This is what my build commands look like in Geany IDE with **GNU Automake Tools**. #### This is what my build commands look like in *Geany IDE* with **GNU Automake Tools**.
| Name | Command | Working Directory | | Name | Command | Working Directory |
| ----------- | ------------------ | -------------------------------------------------------------------- | | ----------- | ------------------ | -------------------------------------------------------------------- |
@ -154,5 +155,7 @@ oDinZu WenKi(Charles) https://liberapay.com/oDinZu/
* GObject Documentation https://docs.gtk.org/gobject/index.html * GObject Documentation https://docs.gtk.org/gobject/index.html
* GTK 4 Demos https://gitlab.gnome.org/GNOME/gtk/-/tree/main/demos * GTK 4 Demos https://gitlab.gnome.org/GNOME/gtk/-/tree/main/demos
* GTK 4 Documentation https://docs.gtk.org/gtk4/ * GTK 4 Documentation https://docs.gtk.org/gtk4/
* PostgreSQL 15 Documentation https://www.postgresql.org/docs/15/index.html
* SQLite3 Documentation https://www.sqlite.org/capi3ref.html
*Notice: We focus implementation with the C programming language and only add various features of C ++ code.* *Notice: We focus implementation with the C programming language and only add various features of C ++ code.*

View File

@ -10,7 +10,6 @@
# License: GPL-3.0 # License: GPL-3.0
# Version: 0.0.1 # Version: 0.0.1
# This is Free Software released under GPL-3.0. Any misuse of this software # This is Free Software released under GPL-3.0. Any misuse of this software
# will be followed up with GPL enforcement via Software Freedom Law Center: # will be followed up with GPL enforcement via Software Freedom Law Center:
# https://www.softwarefreedom.org/ # https://www.softwarefreedom.org/
@ -46,7 +45,6 @@ static GtkWidget *register_button;
Functions Functions
*/ */
/* Compare password entries for admin registration confirmation */ /* Compare password entries for admin registration confirmation */
static void static void
update_register_button(GObject *object, update_register_button(GObject *object,
@ -105,7 +103,6 @@ activate(GtkApplication *app,
g_object_unref(builder); g_object_unref(builder);
} }
/* /*
Main program begins here Main program begins here
*/ */