-
Notifications
You must be signed in to change notification settings - Fork 2
Fixing for Windows and Linux #50
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
Open
victordmontero
wants to merge
1
commit into
aneury1:master
Choose a base branch
from
victordmontero:dev/victor-test2
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,11 +17,6 @@ set(DOENGINE_PREFERED_LANGUAGE 17) | |
| set(CMAKE_BUILD_TYPE Debug) | ||
| set(CMAKE_CXX_STANDARD ${DOENGINE_PREFERED_LANGUAGE}) | ||
|
|
||
| set(SDL2IMAGE_INSTALL OFF) | ||
| set(BUILD_SHARED_LIBS FALSE) | ||
| set(SDL2_DISABLE_INSTALL OFF) | ||
| set(SDL2TTF_VENDORED TRUE) | ||
|
|
||
| if(FETCH_SDL_FROM_GIT) | ||
| include(cmake-module/fetchSDLProjectFromSource.cmake) | ||
| else() | ||
|
|
@@ -30,6 +25,26 @@ endif() | |
|
|
||
| set(ASSETS_DIR ${CMAKE_SOURCE_DIR}/assets) | ||
|
|
||
| set(DOENGINE_LIBRARIES ) | ||
| if(FETCH_SDL_FROM_GIT) | ||
| set(DOENGINE_LIBRARIES ${DOENGINE_LIBRARIES} | ||
| SDL2::SDL2 | ||
| SDL2::SDL2main | ||
| SDL2_ttf | ||
| SDL2_image | ||
| SDL2_mixer | ||
| ) | ||
| else() | ||
| set(DOENGINE_LIBRARIES ${DOENGINE_LIBRARIES} | ||
| SDL2 | ||
| SDL2main | ||
| SDL2_ttf | ||
| SDL2_image | ||
| SDL2_mixer | ||
| GL | ||
| ) | ||
| endif() | ||
|
|
||
| if(DOENGINE_TESTS) | ||
| enable_testing() | ||
| add_subdirectory(src/test) | ||
|
|
@@ -131,103 +146,10 @@ add_library(${PROJECT_NAME} | |
| ${DOENGINE_SRC} | ||
| ) | ||
|
|
||
| set(DOENGINE_LIBRARIES ) | ||
| if(FETCH_SDL_FROM_GIT) | ||
| set(DOENGINE_LIBRARIES ${DOENGINE_LIBRARIES} | ||
| SDL2::SDL2 | ||
| SDL2::SDL2main | ||
| SDL2_ttf | ||
| SDL2_image | ||
| SDL2_mixer | ||
| ) | ||
| else() | ||
| set(DOENGINE_LIBRARIES ${DOENGINE_LIBRARIES} | ||
| SDL2 | ||
| SDL2main | ||
| SDL2_ttf | ||
| SDL2_image | ||
| SDL2_mixer | ||
| GL | ||
| ) | ||
| endif() | ||
|
|
||
| target_link_libraries(${PROJECT_NAME} PRIVATE ${DOENGINE_LIBRARIES}) | ||
|
|
||
| message("Copying asssets to buils dir.") | ||
| file(COPY ${ASSETS_DIR} | ||
| DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) | ||
| # install(TARGETS ${PROJECT_NAME} DESTINATION /home/afl/Desktop/doengine ) | ||
|
|
||
|
|
||
| #add_executable(${PROJECT_NAME}-sample | ||
| # sample/ignored_main.cpp | ||
| #) | ||
| add_executable(${PROJECT_NAME}-pong-sample | ||
| sample/pong/SimplePong.cpp | ||
| ) | ||
|
|
||
| add_executable(${PROJECT_NAME}-SpaceInvader-sample | ||
| sample/SpaceInvader/SpaceInvader.cpp | ||
| ) | ||
|
|
||
| add_executable(${PROJECT_NAME}-Tetris-sample | ||
| sample/tetris/Tetris.cpp | ||
| ) | ||
|
|
||
| add_executable(${PROJECT_NAME}-MusicPlayer-sample | ||
| sample/MusicPlayer/MusicPlayer.cpp | ||
| ) | ||
| add_executable(BattleSpawn | ||
| sample/BattleSpawn/BattleSpawn.cpp | ||
| ) | ||
| add_executable(PacmanClone | ||
| sample/Pacman/Pacman.cpp | ||
| ) | ||
|
|
||
| add_executable(BattleCityRecreation | ||
| sample/BattleCityRecreation/BattleCityRecreation.cpp | ||
| ) | ||
|
|
||
| # to build sample needs | ||
| # Zip support, ubuntu sudo apt-get install libzip-dev | ||
| #target_link_libraries(${PROJECT_NAME}-sample PRIVATE | ||
| # ${PROJECT_NAME} | ||
| # ${DOENGINE_LIBRARIES} | ||
| #) | ||
|
|
||
| target_link_libraries(${PROJECT_NAME}-pong-sample PRIVATE | ||
| ${PROJECT_NAME} | ||
| ${DOENGINE_LIBRARIES} | ||
| ) | ||
|
|
||
| target_link_libraries(${PROJECT_NAME}-SpaceInvader-sample PRIVATE | ||
| ${PROJECT_NAME} | ||
| ${DOENGINE_LIBRARIES} | ||
| ) | ||
|
|
||
| target_link_libraries(${PROJECT_NAME}-Tetris-sample PRIVATE | ||
| ${PROJECT_NAME} | ||
| ${DOENGINE_LIBRARIES} | ||
| ) | ||
|
|
||
| target_link_libraries(${PROJECT_NAME}-MusicPlayer-sample PRIVATE | ||
| ${PROJECT_NAME} | ||
| ${DOENGINE_LIBRARIES} | ||
| ) | ||
|
|
||
| target_link_libraries(BattleSpawn PRIVATE | ||
| ${PROJECT_NAME} | ||
| ${DOENGINE_LIBRARIES} | ||
| ) | ||
|
|
||
| target_link_libraries(PacmanClone PRIVATE | ||
| ${PROJECT_NAME} | ||
| ${DOENGINE_LIBRARIES} | ||
| ) | ||
|
|
||
|
|
||
| target_link_libraries(BattleCityRecreation PRIVATE | ||
| ${PROJECT_NAME} | ||
| ${DOENGINE_LIBRARIES} | ||
| ) | ||
|
|
||
|
Comment on lines
-161
to
-233
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moved to sample/CMakeLists.txt |
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,9 +8,9 @@ extern "C" | |
| #include <SDL2/SDL_events.h> | ||
| #include <SDL2/SDL_joystick.h> | ||
| #include <SDL2/SDL_log.h> | ||
| #include <SDL2/SDL_image.h> | ||
| #include <SDL2/SDL_ttf.h> | ||
| #include <SDL2/SDL_mixer.h> | ||
| #include <SDL_image.h> | ||
| #include <SDL_ttf.h> | ||
| #include <SDL_mixer.h> | ||
|
Comment on lines
-11
to
+13
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Verify if this causes you problems @aneury1 |
||
| } | ||
|
|
||
| #endif | ||
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
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to move to fetchSDL cmake module