Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMake build system and move/rename examples #45

Closed
wants to merge 6 commits into from
Closed

Add CMake build system and move/rename examples #45

wants to merge 6 commits into from

Conversation

jopadan
Copy link

@jopadan jopadan commented Mar 9, 2022

No description provided.

@Loobinex
Copy link
Member

Loobinex commented Mar 9, 2022

@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?

@dotted
Copy link
Member

dotted commented Mar 9, 2022

Good work, just fix the ${SDL_LIBRARIES} issue and I will be happy to merge this.

@dotted
Copy link
Member

dotted commented Mar 9, 2022

It would be nice if we could retain the possibility of building mapslang directly from within the mapslang folder, instead of having to build from the parent directory.

@dotted dotted self-requested a review March 9, 2022 18:15
CMakeLists.txt Outdated
add_test( puttrain puttrain )

add_executable( viewmap ${EXAMPLES_VIEWMAP_SOURCES} )
target_link_libraries( viewmap PUBLIC adikted m dl ${SDL_LIBRARIES})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider making it optional so if SDL is not found the viewmap and putemple example projects are not built. Not super important though.

@dotted
Copy link
Member

dotted commented Mar 28, 2022

Continued in #48

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants