Commit 370515d
Dan Dees
FIRST - add cmake build generator - CMakeLists.txt
- 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.cmake1 parent 588b48e commit 370515d
File tree
6 files changed
+269
-0
lines changed- 3rdparty
- MemoryModule
- a
- test
6 files changed
+269
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments