Open
Conversation
ebbab67 to
1020b8a
Compare
added 8 commits
June 1, 2025 15:26
- out of source build
- no projects or build artifacts polluting source tree
- supports CI/CD automation
- generates many build types with simple command line option
- https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html
- ninja - FAST command line
- visual studio project
- msbuild
- msys make
- name
- builds static, shared (DLL), and "reflection main" libraries
- shared library includes 3rd party
- no install needed of Detours as linked into DLL
- support shared DLL and "relection" option DLL
- creates library/header installation
- installs as package
- supports vcpkg, conan, CPM
- supports nuget
- https://cmake.org/cmake/help/latest/cpack_gen/nuget.html
- builds 3rd party deps
- automates debug and release builds
- done with ninja/msbuild
- exports config for use in other cmake project
- MemoryModulePPConfigVersion.cmake
- find_package(MemoryModulePP CONFIG) is enough to use in another project
- https://cmake.org/cmake/help/latest/command/find_package.html
- importing and exporting cmake project
- https://cmake.org/cmake/help/latest/guide/importing-exporting/index.html
- maintainable
- LLMs such as ChatGPT can create/maintain CMakeLists.txt
- no longer need to learn the book and best practices
- CMakeList modern format with targets as objects
- CMAKE_DEBUG_POSTIFIX allows debug and release dll/exe in same directory
example ninja installation output
...
-- Install configuration: "Debug"
-- Install configuration: "Debug"
-- Installing: x:/vs17-64/memorymodulepp/lib/MemoryModulePP-static_d.lib
-- Installing: x:/vs17-64/memorymodulepp/include/BaseAddressIndex.h
-- Installing: x:/vs17-64/memorymodulepp/include/ImportTable.h
-- Installing: x:/vs17-64/memorymodulepp/include/Initialize.h
-- Installing: x:/vs17-64/memorymodulepp/include/InvertedFunctionTable.h
-- Installing: x:/vs17-64/memorymodulepp/include/LdrEntry.h
-- Installing: x:/vs17-64/memorymodulepp/include/LoadDllMemoryApi.h
-- Installing: x:/vs17-64/memorymodulepp/include/Loader.h
-- Installing: x:/vs17-64/memorymodulepp/include/MemoryModule.h
-- Installing: x:/vs17-64/memorymodulepp/include/MmpGlobalData.h
-- Installing: x:/vs17-64/memorymodulepp/include/MmpDotNet.h
-- Installing: x:/vs17-64/memorymodulepp/include/MmpTls.h
-- Installing: x:/vs17-64/memorymodulepp/include/Utils.h
-- Installing: x:/vs17-64/memorymodulepp/lib/MemoryModulePP-shared_d.lib
-- Installing: x:/vs17-64/memorymodulepp/bin/MemoryModulePP-shared_d.dll
-- Installing: x:/vs17-64/memorymodulepp/include/BaseAddressIndex.h
-- Installing: x:/vs17-64/memorymodulepp/include/ImportTable.h
-- Installing: x:/vs17-64/memorymodulepp/include/Initialize.h
-- Installing: x:/vs17-64/memorymodulepp/include/InvertedFunctionTable.h
-- Installing: x:/vs17-64/memorymodulepp/include/LdrEntry.h
-- Installing: x:/vs17-64/memorymodulepp/include/LoadDllMemoryApi.h
-- Installing: x:/vs17-64/memorymodulepp/include/Loader.h
-- Installing: x:/vs17-64/memorymodulepp/include/MemoryModule.h
-- Installing: x:/vs17-64/memorymodulepp/include/MmpGlobalData.h
-- Installing: x:/vs17-64/memorymodulepp/include/MmpDotNet.h
-- Installing: x:/vs17-64/memorymodulepp/include/MmpTls.h
-- Installing: x:/vs17-64/memorymodulepp/include/Utils.h
-- Installing: x:/vs17-64/memorymodulepp/lib/MemoryModulePP-relfect-shared_d.lib
-- Installing: x:/vs17-64/memorymodulepp/bin/MemoryModulePP-relfect-shared_d.dll
-- Installing: x:/vs17-64/memorymodulepp/include/BaseAddressIndex.h
-- Installing: x:/vs17-64/memorymodulepp/include/ImportTable.h
-- Installing: x:/vs17-64/memorymodulepp/include/Initialize.h
-- Installing: x:/vs17-64/memorymodulepp/include/InvertedFunctionTable.h
-- Installing: x:/vs17-64/memorymodulepp/include/LdrEntry.h
-- Installing: x:/vs17-64/memorymodulepp/include/LoadDllMemoryApi.h
-- Installing: x:/vs17-64/memorymodulepp/include/Loader.h
-- Installing: x:/vs17-64/memorymodulepp/include/MemoryModule.h
-- Installing: x:/vs17-64/memorymodulepp/include/MmpGlobalData.h
-- Installing: x:/vs17-64/memorymodulepp/include/MmpDotNet.h
-- Installing: x:/vs17-64/memorymodulepp/include/MmpTls.h
-- Installing: x:/vs17-64/memorymodulepp/include/Utils.h
-- Installing: x:/vs17-64/memorymodulepp/lib/cmake/MemoryModulePP/MemoryModulePPTargets.cmake
-- Installing: x:/vs17-64/memorymodulepp/lib/cmake/MemoryModulePP/MemoryModulePPTargets-debug.cmake
-- Installing: x:/vs17-64/memorymodulepp/lib/cmake/MemoryModulePP/MemoryModulePPConfig.cmake
-- Installing: x:/vs17-64/memorymodulepp/lib/cmake/MemoryModulePP/MemoryModulePPConfigVersion.cmake
- problems with exported global at runtime - wrapping data access in a function allows additional controls
9b5ccd3 to
6250b39
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
tested cmake with ninja and visual studio 2022
dll and static version
as well as existing project
extensive explanations in the commits