From d29d40448b4fd011fc252c9dcb38c1e9f1275bb3 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Mon, 23 Dec 2024 09:23:46 +0800 Subject: [PATCH] fix: fix CMake install path issue. - fix the wrong reference in CMake script which install lib target into wrong directory. - add file, change CMake script and modify header file for preparing develop of CKLight and CKCamera. - fix doc typo. --- CMakeLists.txt | 6 +++--- LibCmo/CK2/ObjImpls/CKCamera.cpp | 6 ++++++ LibCmo/CK2/ObjImpls/CKCamera.hpp | 8 ++++++++ LibCmo/CK2/ObjImpls/CKLight.cpp | 6 ++++++ LibCmo/CK2/ObjImpls/CKLight.hpp | 8 ++++++++ LibCmo/CK2/ObjImpls/CKTargetCamera.cpp | 6 ++++++ LibCmo/CK2/ObjImpls/CKTargetCamera.hpp | 8 ++++++++ LibCmo/CK2/ObjImpls/CKTargetLight.cpp | 6 ++++++ LibCmo/CK2/ObjImpls/CKTargetLight.hpp | 8 ++++++++ LibCmo/CMakeLists.txt | 8 ++++++++ LibCmo/VTAll.hpp | 4 ++++ LibCmo/VTEncoding.hpp | 2 +- LibCmo/VTInternal.hpp | 6 +++--- 13 files changed, 75 insertions(+), 7 deletions(-) create mode 100644 LibCmo/CK2/ObjImpls/CKCamera.cpp create mode 100644 LibCmo/CK2/ObjImpls/CKCamera.hpp create mode 100644 LibCmo/CK2/ObjImpls/CKLight.cpp create mode 100644 LibCmo/CK2/ObjImpls/CKLight.hpp create mode 100644 LibCmo/CK2/ObjImpls/CKTargetCamera.cpp create mode 100644 LibCmo/CK2/ObjImpls/CKTargetCamera.hpp create mode 100644 LibCmo/CK2/ObjImpls/CKTargetLight.cpp create mode 100644 LibCmo/CK2/ObjImpls/CKTargetLight.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 88e30e2..19e68d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,7 @@ endif () install(EXPORT LibCmoTargets FILE LibCmoTargets.cmake NAMESPACE NeMo:: - DESTINATION ${YYCC_INSTALL_LIB_PATH}/cmake/LibCmo + DESTINATION ${NEMO_INSTALL_LIB_PATH}/cmake/LibCmo ) # Package configuration file include(CMakePackageConfigHelpers) @@ -65,7 +65,7 @@ write_basic_package_version_file( configure_package_config_file( ${CMAKE_CURRENT_LIST_DIR}/CMake/LibCmoConfig.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/LibCmoConfig.cmake" - INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/LibCmo + INSTALL_DESTINATION ${NEMO_INSTALL_LIB_PATH}/cmake/LibCmo ) # Copy package files to install destination install( @@ -73,5 +73,5 @@ FILES "${CMAKE_CURRENT_BINARY_DIR}/LibCmoConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/LibCmoConfigVersion.cmake" DESTINATION - ${CMAKE_INSTALL_LIBDIR}/cmake/LibCmo + ${NEMO_INSTALL_LIB_PATH}/cmake/LibCmo ) diff --git a/LibCmo/CK2/ObjImpls/CKCamera.cpp b/LibCmo/CK2/ObjImpls/CKCamera.cpp new file mode 100644 index 0000000..02bb0cd --- /dev/null +++ b/LibCmo/CK2/ObjImpls/CKCamera.cpp @@ -0,0 +1,6 @@ +#include "CKCamera.hpp" +#include "../CKStateChunk.hpp" + +namespace LibCmo::CK2::ObjImpls { + +} diff --git a/LibCmo/CK2/ObjImpls/CKCamera.hpp b/LibCmo/CK2/ObjImpls/CKCamera.hpp new file mode 100644 index 0000000..7765a2d --- /dev/null +++ b/LibCmo/CK2/ObjImpls/CKCamera.hpp @@ -0,0 +1,8 @@ +#pragma once + +#include "../../VTInternal.hpp" +#include "CKBeObject.hpp" + +namespace LibCmo::CK2::ObjImpls { + +} diff --git a/LibCmo/CK2/ObjImpls/CKLight.cpp b/LibCmo/CK2/ObjImpls/CKLight.cpp new file mode 100644 index 0000000..feadab1 --- /dev/null +++ b/LibCmo/CK2/ObjImpls/CKLight.cpp @@ -0,0 +1,6 @@ +#include "CKLight.hpp" +#include "../CKStateChunk.hpp" + +namespace LibCmo::CK2::ObjImpls { + +} diff --git a/LibCmo/CK2/ObjImpls/CKLight.hpp b/LibCmo/CK2/ObjImpls/CKLight.hpp new file mode 100644 index 0000000..7765a2d --- /dev/null +++ b/LibCmo/CK2/ObjImpls/CKLight.hpp @@ -0,0 +1,8 @@ +#pragma once + +#include "../../VTInternal.hpp" +#include "CKBeObject.hpp" + +namespace LibCmo::CK2::ObjImpls { + +} diff --git a/LibCmo/CK2/ObjImpls/CKTargetCamera.cpp b/LibCmo/CK2/ObjImpls/CKTargetCamera.cpp new file mode 100644 index 0000000..a03a53e --- /dev/null +++ b/LibCmo/CK2/ObjImpls/CKTargetCamera.cpp @@ -0,0 +1,6 @@ +#include "CKTargetCamera.hpp" +#include "../CKStateChunk.hpp" + +namespace LibCmo::CK2::ObjImpls { + +} diff --git a/LibCmo/CK2/ObjImpls/CKTargetCamera.hpp b/LibCmo/CK2/ObjImpls/CKTargetCamera.hpp new file mode 100644 index 0000000..7765a2d --- /dev/null +++ b/LibCmo/CK2/ObjImpls/CKTargetCamera.hpp @@ -0,0 +1,8 @@ +#pragma once + +#include "../../VTInternal.hpp" +#include "CKBeObject.hpp" + +namespace LibCmo::CK2::ObjImpls { + +} diff --git a/LibCmo/CK2/ObjImpls/CKTargetLight.cpp b/LibCmo/CK2/ObjImpls/CKTargetLight.cpp new file mode 100644 index 0000000..a8a2f49 --- /dev/null +++ b/LibCmo/CK2/ObjImpls/CKTargetLight.cpp @@ -0,0 +1,6 @@ +#include "CKTargetLight.hpp" +#include "../CKStateChunk.hpp" + +namespace LibCmo::CK2::ObjImpls { + +} diff --git a/LibCmo/CK2/ObjImpls/CKTargetLight.hpp b/LibCmo/CK2/ObjImpls/CKTargetLight.hpp new file mode 100644 index 0000000..7765a2d --- /dev/null +++ b/LibCmo/CK2/ObjImpls/CKTargetLight.hpp @@ -0,0 +1,8 @@ +#pragma once + +#include "../../VTInternal.hpp" +#include "CKBeObject.hpp" + +namespace LibCmo::CK2::ObjImpls { + +} diff --git a/LibCmo/CMakeLists.txt b/LibCmo/CMakeLists.txt index 980693b..9d32080 100644 --- a/LibCmo/CMakeLists.txt +++ b/LibCmo/CMakeLists.txt @@ -30,6 +30,10 @@ PRIVATE CK2/ObjImpls/CKMesh.cpp CK2/ObjImpls/CKObject.cpp CK2/ObjImpls/CKTexture.cpp + CK2/ObjImpls/CKLight.cpp + CK2/ObjImpls/CKTargetLight.cpp + CK2/ObjImpls/CKCamera.cpp + CK2/ObjImpls/CKTargetCamera.cpp # VxMath VxMath/VxMemoryMappedFile.cpp VxMath/VxMath.cpp @@ -73,6 +77,10 @@ FILES CK2/ObjImpls/CK3dObject.hpp CK2/ObjImpls/CKRenderObject.hpp CK2/ObjImpls/CKSceneObject.hpp + CK2/ObjImpls/CKLight.hpp + CK2/ObjImpls/CKTargetLight.hpp + CK2/ObjImpls/CKCamera.hpp + CK2/ObjImpls/CKTargetCamera.hpp # VxMath VxMath/VxTypes.hpp VxMath/VxMath.hpp diff --git a/LibCmo/VTAll.hpp b/LibCmo/VTAll.hpp index 461a40b..d21ac5e 100644 --- a/LibCmo/VTAll.hpp +++ b/LibCmo/VTAll.hpp @@ -34,6 +34,10 @@ #include "CK2/ObjImpls/CKTexture.hpp" #include "CK2/ObjImpls/CKMaterial.hpp" #include "CK2/ObjImpls/CKMesh.hpp" +#include "CK2/ObjImpls/CKLight.hpp" +#include "CK2/ObjImpls/CKTargetLight.hpp" +#include "CK2/ObjImpls/CKCamera.hpp" +#include "CK2/ObjImpls/CKTargetCamera.hpp" // CK2 Managers #include "CK2/MgrImpls/CKBaseManager.hpp" diff --git a/LibCmo/VTEncoding.hpp b/LibCmo/VTEncoding.hpp index 841e64c..013dc95 100644 --- a/LibCmo/VTEncoding.hpp +++ b/LibCmo/VTEncoding.hpp @@ -36,7 +36,7 @@ namespace LibCmo::EncodingHelper { * In underlying implementation, it actually is \c nullptr. * Because EncodingToken is just a raw pointer. */ - constexpr EncodingToken INVALID_ENCODING_TOKEN = nullptr; + inline constexpr EncodingToken INVALID_ENCODING_TOKEN = nullptr; /** * @brief Create encoding token by given universal encoding name. diff --git a/LibCmo/VTInternal.hpp b/LibCmo/VTInternal.hpp index b1d7c8d..6e9ef15 100644 --- a/LibCmo/VTInternal.hpp +++ b/LibCmo/VTInternal.hpp @@ -4,9 +4,9 @@ * \file * The top header file for LibCom self development. * Every C++ header or source file located in this project should include this first - * except the headers including this file. + * except the headers included in this file. * The header files included by this header should be carefully managed, - * to make sure there are no include loop and each header files can works correctly. + * to make sure there are no include loop and each header files can work correctly. * * This header should only be used as internal header file. * It only contains all necessary stuff used by this project self. @@ -17,7 +17,7 @@ * So they will use native type, not CK type for declaration and implementation. * Take VTEncoding.hpp for example, All string used in it is \c std::u8string, not LibCmo::XContainer::XString. * The file starts with \c CK, \c Vx, and \c X is a part of Virtools SDK. - * They should use Virtools type anywhere, except that Virtools type can not fulfill their requirement. + * They should use Virtools type anywhere, except that Virtools type can not fulfill their requirements. */ // The base header of LibCmo.