drogonCMS-cmake #20
@ -90,6 +90,7 @@ endif()
|
|||||||
|
|
||||||
# Find packages go here.
|
# Find packages go here.
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
|
find_package(PostgreSQL REQUIRED)
|
||||||
|
|
||||||
pkg_check_modules(GTK4 REQUIRED gtk4>=4.0)
|
pkg_check_modules(GTK4 REQUIRED gtk4>=4.0)
|
||||||
message("GTK4 include dir: ${GTK4_INCLUDE_DIRS}")
|
message("GTK4 include dir: ${GTK4_INCLUDE_DIRS}")
|
||||||
@ -108,15 +109,16 @@ message("ADW Other CFlags: ${ADW_CFLAGS_OTHER}")
|
|||||||
|
|
||||||
# Setup CMake to use GTK+, tell the compiler where to look for headers
|
# Setup CMake to use GTK+, tell the compiler where to look for headers
|
||||||
# and to the linker where to look for libraries
|
# and to the linker where to look for libraries
|
||||||
include_directories(${GTK4_INCLUDE_DIRS} ${ADW_INCLUDE_DIRS})
|
include_directories(${GTK4_INCLUDE_DIRS} ${ADW_INCLUDE_DIRS} ${PostgreSQL_INCLUDE_DIRS} ${PostgreSQL_SERVER_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})
|
||||||
|
|
||||||
# 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 src/base.c)
|
||||||
|
#add_executable(PG_Store vendors/postgresql-db/main.cc)
|
||||||
|
|
||||||
# Include drogon source code locally
|
# Include drogon source code locally
|
||||||
add_subdirectory(vendors/local-api-server/)
|
add_subdirectory(vendors/api-server/)
|
||||||
add_subdirectory(vendors/simple-reverse-proxy/)
|
add_subdirectory(vendors/simple-reverse-proxy/)
|
||||||
|
|
||||||
# This is a "default" library, and will match the *** variable setting.
|
# This is a "default" library, and will match the *** variable setting.
|
||||||
@ -129,7 +131,7 @@ add_subdirectory(vendors/simple-reverse-proxy/)
|
|||||||
# Make sure you link your targets with this command. It can also link libraries and
|
# Make sure you link your targets with this command. It can also link libraries and
|
||||||
# even flags, so linking a target that does not exist will not give a configure-time error.
|
# even flags, so linking a target that does not exist will not give a configure-time error.
|
||||||
target_include_directories(${PROJECT_NAME} PUBLIC ${GTK4_LIBRARIES} ${ADW_LIBRARIES})
|
target_include_directories(${PROJECT_NAME} PUBLIC ${GTK4_LIBRARIES} ${ADW_LIBRARIES})
|
||||||
target_link_libraries(${PROJECT_NAME} PRIVATE ${GTK4_LIBRARIES} ${ADW_LIBRARIES} drogon)
|
target_link_libraries(${PROJECT_NAME} PRIVATE ${GTK4_LIBRARIES} ${ADW_LIBRARIES} PostgreSQL::PostgreSQL)
|
||||||
|
|
||||||
# Target Compile Options
|
# Target Compile Options
|
||||||
target_compile_options(${PROJECT_NAME} PRIVATE ${WARNING_LEVELS_GCC} $<$<CONFIG:DEBUG>:${WARNING_LEVELS_GCC_DEBUG}>)
|
target_compile_options(${PROJECT_NAME} PRIVATE ${WARNING_LEVELS_GCC} $<$<CONFIG:DEBUG>:${WARNING_LEVELS_GCC_DEBUG}>)
|
||||||
|
@ -122,7 +122,7 @@ An optional recommendation is Geany IDE.
|
|||||||
| Configure | cmake -D CMAKE_BUILD_TYPE=Release | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/ |
|
| Configure | cmake -D CMAKE_BUILD_TYPE=Release | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/ |
|
||||||
| Build | cmake --build . | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS |
|
| Build | cmake --build . | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS |
|
||||||
| Run GUI | ./DrogonCMS | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/ |
|
| Run GUI | ./DrogonCMS | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/ |
|
||||||
| Run API | ./local-drogon-server-api | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/vendors/drogon/local-api-server/ |
|
| Run API | ./DrogonCMS-API-Server | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/vendors/api-server/ |
|
||||||
| Install | cmake --install | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/ |
|
| Install | cmake --install | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/ |
|
||||||
|
|
||||||
## Authors
|
## Authors
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Note: drogon_ctl was implemented to create the local template architecture
|
# Note: drogon_ctl was implemented to create the local template architecture
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
project(local-drogon-api-server CXX)
|
project(DrogonCMS-API-Server CXX)
|
||||||
|
|
||||||
include(CheckIncludeFileCXX)
|
include(CheckIncludeFileCXX)
|
||||||
|
|
BIN
vendors/api-server/DrogonCMS-API-Server
vendored
Executable file
BIN
vendors/api-server/DrogonCMS-API-Server
vendored
Executable file
Binary file not shown.
BIN
vendors/api-server/test/local-server_test
vendored
Executable file
BIN
vendors/api-server/test/local-server_test
vendored
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user