Add CMake build system and move/rename examples#45
Add CMake build system and move/rename examples#45jopadan wants to merge 6 commits intodkfans:masterfrom jopadan:master
Conversation
|
@jopadan I used to build adikted by typing 'make all' in WSL in adikted/mapslang. Trying to build your PR and it does not find a makefile. How can one build now? |
|
Good work, just fix the |
|
It would be nice if we could retain the possibility of building |
CMakeLists.txt
Outdated
| add_test( puttrain puttrain ) | ||
|
|
||
| add_executable( viewmap ${EXAMPLES_VIEWMAP_SOURCES} ) | ||
| target_link_libraries( viewmap PUBLIC adikted m dl ${SDL_LIBRARIES}) |
There was a problem hiding this comment.
Change ${SDL_LIBRARIES} to ${SDL_LIBRARY} as it only exists in CMake 3.19 and onwards
CMakeLists.txt
Outdated
| add_test( viewmap viewmap ) | ||
|
|
||
| add_executable( putemple ${EXAMPLES_PUTEMPLE_SOURCES} ) | ||
| target_link_libraries( putemple PRIVATE adikted m dl ${SDL_LIBRARIES}) |
There was a problem hiding this comment.
Change ${SDL_LIBRARIES} to ${SDL_LIBRARY} as it only exists in CMake 3.19 and onwards
CMakeLists.txt
Outdated
| file( GLOB_RECURSE EXAMPLES_PUTEMPLE_SOURCES examples/putemple/*.c | ||
| examples/putemple/*.h ) | ||
|
|
||
| find_package( SDL REQUIRED SDL::Main ) |
There was a problem hiding this comment.
Consider making it optional so if SDL is not found the viewmap and putemple example projects are not built. Not super important though.
|
Continued in #48 |
No description provided.