-
Notifications
You must be signed in to change notification settings - Fork 108
add cmake support #64
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Open
dand-oss
wants to merge
7
commits into
bb107:master
Choose a base branch
from
dand-oss:cmake-dll
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
ca2a88e
to
ebbab67
Compare
- 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
# for free
to join this conversation on GitHub.
Already have an account?
# 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