Skip to content

Commit

Permalink
Merge pull request #1085 from dlyr/small_fixes
Browse files Browse the repository at this point in the history
Small fixes
  • Loading branch information
dlyr authored Oct 9, 2024
2 parents 53545a9 + 1ca7a77 commit a929583
Show file tree
Hide file tree
Showing 47 changed files with 173 additions and 296 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,12 @@ jobs:
uses: actions/checkout@master
with:
path: src/Radium-Engine
submodules: 'recursive'
- name: pull updated repo (e.g. with new VERSION)
if: ${{ github.event_name == 'push' }}
run: git -C src/Radium-Engine pull origin ${{ github.event.ref }}
run: |
git -C src/Radium-Engine pull origin ${{ github.event.ref }}
git -C src/Radium-Engine submodule update --init --recursive
- name: Cache externals
id: cache-external
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
sudo apt-get install graphviz plantuml clang-9 libclang-9-dev
- name: Fetch recent doxygen (1.9.8)
run: |
wget https://sourceforge.net/projects/doxygen/files/rel-1.9.8/doxygen-1.9.8.linux.bin.tar.gz -O doxygen.tar.gz
wget https://sourceforge.net/projects/doxygen/files/rel-1.12.0/doxygen-1.12.0.linux.bin.tar.gz -O doxygen.tar.gz
tar -zxvf doxygen.tar.gz -C doxygen --wildcards "*/bin"
mv doxygen/*/bin doxygen/
- name: Extract ref for badges prefix
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "external/doxygen-awesome-css"]
path = external/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
[submodule "cmake/cmake-message-helpers"]
path = cmake/cmake-message-helpers
url = https://github.com/dlyr/cmake-message-helpers.git
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: ^tests/.*/data/.*$
Expand All @@ -26,12 +26,12 @@ repos:
# - id: cppcheck
# args: [--enable=all]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.37.0
rev: v0.42.0
hooks:
- id: markdownlint
args: [-f]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v17.0.2
rev: v19.1.1
hooks:
- id: clang-format
types_or: [c++, c, cuda]
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ cmake_policy(SET CMP0092 NEW) # do not set /W3 for msvc

set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)

include(${CMAKE_SOURCE_DIR}/cmake/cmake-message-helpers/MessageHelpers.cmake)
message_prefix_push("Main")
# Project setup, versioning stuff here, change when changing the version
# ~~~
# Note: keep the project name lower case only for easy linux packaging support
Expand Down Expand Up @@ -172,6 +173,7 @@ endif(RADIUM_ENABLE_COVERAGE)
# Installation utilities
include(RadiumSetupFunctions)

message_prefix_pop()
# Documentation build
add_subdirectory(doc)

Expand Down Expand Up @@ -296,7 +298,7 @@ install(FILES LICENSE README.md TYPE DATA)

# -------------------------------------------------------------------------------
# Wrap up of settings printed on build
include(MessageFunc)

message(NOTICE "")
message_title(" Final overview for ${PROJECT_NAME} ")
message_info(" ")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Radium-Engine libraries

![banner](doc/images/radium-banner.png)
![banner](doc/images/radium-banner.webp)

Radium is a research 3D Engine for rendering, animation and processing.
It is developed and maintained by the [STORM research group](https://www.irit.fr/STORM/site/).
Expand Down
113 changes: 0 additions & 113 deletions cmake/MessageFunc.cmake

This file was deleted.

4 changes: 2 additions & 2 deletions cmake/Sanitizers.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
list(APPEND CMAKE_MESSAGE_INDENT "[Sanitizers] ")
message_prefix_push("Sanitizers")
# ------------------------------------------------------------------------------
# Clang and gcc sanitizers
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
Expand Down Expand Up @@ -36,4 +36,4 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL
endif()
endif()

list(REMOVE_AT CMAKE_MESSAGE_INDENT -1)
message_prefix_pop()
1 change: 1 addition & 0 deletions cmake/cmake-message-helpers
Submodule cmake-message-helpers added at 4b6958
78 changes: 25 additions & 53 deletions doc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,60 +1,34 @@
# This CMake file will add doc target for convenient documentation generation.
#
# Additional features are supported:
# * dot = for automatically generated UML diagrams (class, include, caller, call, collaboration)
# * PlantUML = for easy generation of custom diagrams
# inspiration https://github.com/kracejic/EmptyDoxygenCMake/blob/master/CMakeLists.txt

cmake_minimum_required(VERSION 3.18)
project(radium-doc)

if(POLICY CMP0077)
cmake_policy(SET CMP0077 NEW)
endif()
# Helper functions
list(APPEND CMAKE_MESSAGE_INDENT "[Doc] ")

macro(path_linux_to_win MsysPath ResultingPath)
string(REGEX REPLACE "^/([a-zA-Z])/" "\\1:/" ${ResultingPath} "${MsysPath}")
endmacro()
macro(path_win_to_linux MsysPath ResultingPath)
string(REGEX REPLACE "^([a-zA-Z]):/" "/\\1/" ${ResultingPath} "${MsysPath}")
endmacro()
include(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/cmake-message-helpers/MessageHelpers.cmake)
message_prefix_push("Doc")

# enable if doxygen found
find_package(Doxygen 1.8.0)
message(STATUS "Can build doc? ${DOXYGEN_FOUND}")
find_package(Doxygen 1.8 OPTIONAL_COMPONENTS dot)

message(NOTICE "")
message_title(" documentation ${PROJECT_NAME} ")
message_info("Can build doc? ${DOXYGEN_FOUND}")

if(DOXYGEN_FOUND)
# Search for plantUML for creating UML diagrams from doxygen
find_program(
PLANT_UML_PATH NAMES plantuml.jar plantuml PATH_SUFFIXES PlantUML plantuml Plantuml
PATHS /usr/share /usr/local/share/ /usr/local/bin /opt/local/bin c/Program\ Files*
get_target_property(DOT_IMPORTED Doxygen::dot "IMPORTED")
message_setting("DOT_IMPORTED")
find_file(PLANT_UML_PATH NAMES plantuml.jar plantuml PATH_SUFFIXES PlantUML plantuml Plantuml
PATHS /usr/share /usr/local/share/ /usr/local/bin /opt/local/bin c/Program\ Files*
)
if(NOT PLANT_UML_PATH)
message(
WARNING
"Looking for PlantUML - not found, some UML diagrams will not be generated via doxygen."
)
else()
message(STATUS " + PlantUML - for custom UML YES ")
endif()

# Search for DOT for autogenerated UML diagrams from doxygen
find_program(DOT_PATH dot PATH_SUFFIXES graphviz2.38/bin graphviz/bin)
if(NOT DOT_PATH)
message(
WARNING
"Looking for DOT (Graphviz) - not found, some UML diagrams will not be generated via doxygen."
)
else()
message(STATUS " + Graphviz/Dot - for generated graphs YES ")
message_setting("PLANT_UML_PATH")
if(PLANT_UML_PATH)
set(DOXYGEN_PLANTUML_JAR_PATH "${PLANT_UML_PATH}")
endif()

path_win_to_linux(${CMAKE_CURRENT_SOURCE_DIR} CMAKE_CURRENT_SOURCE_DIR_LINUX)
path_win_to_linux(${PROJECT_SOURCE_DIR} PROJECT_SOURCE_DIR_LINUX)
path_win_to_linux(${DOT_PATH} DOT_PATH_LINUX)
path_win_to_linux(${PLANT_UML_PATH} PLANT_UML_PATH_LINUX)
path_win_to_linux(${CMAKE_CURRENT_BINARY_DIR} CMAKE_CURRENT_BINARY_DIR_LINUX)

# configure doxygen target
set(RADIUM_DOC_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/)
set(RADIUM_MAIN_DOC_FILE ${CMAKE_CURRENT_SOURCE_DIR}/main.md)
Expand Down Expand Up @@ -84,7 +58,7 @@ if(DOXYGEN_FOUND)
set(RADIUM_DOXYGEN_AWESOME_CSS "")
endif()
endif()
message(STATUS "Use Doxygen Awesome CSS? ${USE_AWESOME_CSS}")
message_setting("USE_AWESOME_CSS")

# set RADIUM_PROJECT_NUMBER from VERSION file
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/../VERSION" INPUT_Radium_VERSION)
Expand Down Expand Up @@ -119,26 +93,20 @@ if(DOXYGEN_FOUND)
set(DOXYGEN_EXTRACT_ALL "NO")
set(DOXYGEN_EXTRACT_STATIC "YES")
set(DOXYGEN_EXT_LINKS_IN_WINDOW "YES")
set(DOXYGEN_FORCE_LOCAL_INCLUDES "NO")
set(DOXYGEN_GENERATE_TREEVIEW "YES")
set(DOXYGEN_HAVE_DOT "YES")
set(DOXYGEN_HIDE_UNDOC_CLASSES "YES")
set(DOXYGEN_HIDE_UNDOC_RELATIONS "NO")
set(DOXYGEN_HTML_COLORSTYLE "LIGHT")
set(DOXYGEN_HTML_COLORSTYLE_GAMMA "160")
set(DOXYGEN_HTML_COLORSTYLE_HUE "40")
set(DOXYGEN_HTML_COLORSTYLE_SAT "50")
set(DOXYGEN_HTML_COPY_CLIPBOARD "NO")
set(DOXYGEN_HTML_DYNAMIC_SECTIONS "YES")
set(DOXYGEN_HTML_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/header.html")
set(DOXYGEN_HTML_TIMESTAMP "YES")
set(DOXYGEN_IMAGE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/images")
set(DOXYGEN_INCLUDE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../src")
set(DOXYGEN_INTERACTIVE_SVG "YES")
set(DOXYGEN_MACRO_EXPANSION "YES")
set(DOXYGEN_MATHJAX_EXTENSIONS "TeX/AMSsymbols" "TeX/AMSmath")
set(DOXYGEN_MATHJAX_RELPATH "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/")
set(DOXYGEN_PREDEFINED "PARSED_BY_DOXYGEN MULTIARCH= ")
set(DOXYGEN_PROJECT_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/images/radium-logo.png")
set(DOXYGEN_PROJECT_LOGO "${CMAKE_CURRENT_SOURCE_DIR}/images/radium-logo.webp")
set(DOXYGEN_PROJECT_NAME "Radium Engine")
set(DOXYGEN_PROJECT_NUMBER "${RADIUM_PROJECT_NUMBER}")
set(DOXYGEN_RECURSIVE "YES")
Expand All @@ -156,6 +124,9 @@ if(DOXYGEN_FOUND)
set(DOXYGEN_WARN_IF_UNDOCUMENTED "NO")

if(USE_AWESOME_CSS)
set(DOXYGEN_GENERATE_TREEVIEW "YES")
set(DOXYGEN_DISABLE_INDEX "NO")
set(DOXYGEN_FULL_SIDEBAR "NO")
set(DOXYGEN_HTML_EXTRA_STYLESHEET
"${RADIUM_DOXYGEN_AWESOME_CSS}"
"${RADIUM_DOXYGEN_AWESOME_CSS_ROOT}/doxygen-awesome-sidebar-only.css"
Expand All @@ -179,11 +150,12 @@ if(DOXYGEN_FOUND)
${CURRENT_SRC_DIR} WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Generating API documentation with Doxygen"
)

# Where docs will be installed.
if(RADIUM_INSTALL_DOC)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html TYPE DOC OPTIONAL)
endif()
endif()
message_end()
message(NOTICE "")

list(REMOVE_AT CMAKE_MESSAGE_INDENT -1)
message_prefix_pop()
6 changes: 1 addition & 5 deletions doc/LICENSES.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Radium Engine © the Radium Contributors :
* Hugo Rens (imgui and shader editor)
* Valentin Roussellet (core engine, animation and skinning plugins, Windows port)
* Thomas Subileau (spatial data structures)
* David Vanderhaeghe (core, engine, gui, rendering)
* David Vanderhaeghe (core, engine, gui, rendering, logo and graphics)
* Florian Canezin (core, engine, gui, plugins, file loading)

# Third-party libraries
Expand Down Expand Up @@ -61,7 +61,3 @@ be obtained at [https://github.com/assimp/assimp/blob/master/LICENSE](https://gi
STB image is a header-only library, released in the public domain.

The source code is included in this repository or can be obtained at [https://github.com/nothings/stb](https://github.com/nothings/stb)

## Additional material

X-ray Icon, made by *Freepik* from www.flaticon.com is licensed under CC BY 3.0
7 changes: 3 additions & 4 deletions doc/developer/cmakeutilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ The Radium components are :
- IO_HAS_TINYPLY : Identify if Radium::IO was compiled with tinyply support,
- IO_HAS_VOLUMES : Identify if Radium::IO was compiled with pvm volume loader support.
You might use these properties to define compilation macro in your code
-

~~~{.cmake}
get_target_property(USE_ASSIMP Radium::IO IO_HAS_ASSIMP)
Expand Down Expand Up @@ -117,10 +118,8 @@ This function takes the following parameters:
*Parameter name* | *Parameter description*
--------------------------------------------|--------------------
`<NAME> applicationName` | The name of the *executable* target to configure and install
`<USE_PLUGINS>` | If this option is given, the plugins installed into the Radium bundle at
the installation time will be copied into the application bundle.
`<RESOURCES> ResourceDir1 ResourceDir2 ...` | Optional list of directories to be considered as application resources
and installed into the application bundle.
`<USE_PLUGINS>` | If this option is given, the plugins installed into the Radium bundle at the installation time will be copied into the application bundle.
`<RESOURCES> ResourceDir1 ResourceDir2 ...` | Optional list of directories to be considered as application resources and installed into the application bundle.

When installed into a directory `<prefix>`, the application bundle has the following structure on linux, windows or on
MacOsX (if the executable is not configured as a `MACOSX_BUNDLE`):
Expand Down
Loading

0 comments on commit a929583

Please sign in to comment.