Comments (8)
Please create Pull Request
from devilution.
Also, not really a fan of using CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS to set the option globally and prefer to set it on each target as necessary, but it's fine here I guess?
because, i had some troubles with def file and vc++ linker
It's generally very bad form to use something like DEVILUTION_SRC and instead should just list the source files in the add_* calls directly.
why? cmake authors use the same https://gitlab.kitware.com/cmake/cmake/blob/master/Source/CMakeLists.txt#L105
from devilution.
Good start. :-)
A few notes about it:
- Should add the version information, homepage (this git repo?), etc... to the
project
call. Might also be good to explicitly listLANGUAGES CXX
to make it explicit what is in use, though this is optional as the default value is built-in asLANGUAGES CXX C ASM
(though could set it to that). - It's generally very bad form to use something like
DEVILUTION_SRC
and instead should just list the source files in theadd_*
calls directly. - Should also use
target_include_directories
to add the include directories as well (even if it is just the source directory). add_library
generally should use a namespaced alias as well, though in this specific reverse engineering case it's not really needed, but it is still good form.- Traditionally variables should not be used in the target field either (the
${PROJECT_NAME}
bits) as explicit names is always preferred over implicit so you know what exactly is being created here instead of needing to go look up at the project definition to find out. - Oh, and when things like the source files are moved to the
add_executable
and so forth things (as well as theadd_library
) each file listed should be on it's own line, indented over (I prefer a tab so I can set the displayed tab width to whatever I want for the display I'm on, but it doesn't really matter, though as always "Tabs for Indentation, Spaces for alignment" and all), as it increases readability.
:-)
from devilution.
Also, not really a fan of using CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
to set the option globally and prefer to set it on each target as necessary, but it's fine here I guess? Though I'm unsure that the executable itself needs it set anyway, or even the libraries depending on how they are programmed?
from devilution.
why?
It's just considered poor form nowadays as it separates concerns that don't need to be separated. Using a variable implies the source files are used in multiple targets instead of just one. They are entirely fine to use if the file lists will be shared however, but if only a single target uses them then they shouldn't. See CGold.
from devilution.
Does this work with the latest commit? If so, what are the advantages of the project being CMake compatible?
from devilution.
Unless anyone wishes to work on integrating CMake into Devilution, I suggest we close this issue as most users would be building DevilutionX which already supports CMake builds. Devilution is only ever used to verify binary accuracy and thus requires the original build environment.
from devilution.
Agreed, the only reason we also build with other compilers is to avoid tainting the code with things that is to specific to Windows 95 workstations.
from devilution.
Related Issues (20)
- [hellfire] Hive/Crypt - invisible chests and barrels HOT 1
- Are you able to use Hellfire's source code? HOT 1
- [hellfire] OperateL2Door - Please check bin exactness HOT 10
- Building in VS2019: exe attempts to open crypto/rsa key file? HOT 1
- Cleanup code HOT 1
- out of memory error HOT 5
- 60 FPS support? HOT 1
- Migrate macOS builds to GitHub Actions HOT 10
- [Not A Bug] Question about the License and Legal Section in the Readme HOT 5
- MaxGold always depends on auricGold HOT 4
- Gnat String's "Multiple arrows per shot" only fires one arrow HOT 2
- Win98 Support? HOT 1
- Farmer Quest Bug HOT 1
- [Feature request] add option to show items on map HOT 4
- [Android] Option to change stationary toggle to allow moving
- "Legal" section ambiguity HOT 1
- [MSVC][permissive-] devilution failed to build with /permissive- on MSVC HOT 5
- [Need help] Getting a Massive bow of swiftness at clvl 44+ HOT 3
- Is this gap intentional? HOT 1
- mods don't work In the mobile application HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devilution.