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

Draft: Changes to compile on linux #142

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

N00byKing
Copy link

With this + the DOOM PR, compiling and joining games works.
This one is not very clean because I ran out of time lmao

@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
option(ONUT_BUILD_SAMPLES "Build the samples" OFF)
option(ONUT_BUILD_STANDALONE "Build the Javascript Stand Alone" OFF)
option(ONUT_BUILD_UI_EDITOR "Build the UI Editor" OFF)
option(ONUT_USE_SDL "Use SDL+OpenGL on Windows instead of Win32/D3D11/DI8" OFF)
option(ONUT_USE_SDL "Use SDL+OpenGL on Windows instead of Win32/D3D11/DI8" ON)
Copy link
Author

Choose a reason for hiding this comment

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

While I would personally recommend focusing on a cross-platform toolkit, this change is just a placeholder for cleaner separation.

add_subdirectory(./thirdparty/SDL ./thirdparties/SDL)
list(APPEND libs SDL2-static)
else()
list(APPEND libs SDL2)
Copy link
Author

Choose a reason for hiding this comment

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

Had compile issues with the SDL2 submodule, but doesnt really matter because most linux systems ship their own shared lib of SDL2 anyway.

@@ -26,7 +26,7 @@ float Vector2::Angle(const Vector2& from, const Vector2& to)
{
if (from == to) return 0.0f;
auto dir = to - from;
auto rad = std::atan2f(dir.y, dir.x);
Copy link
Author

Choose a reason for hiding this comment

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

Probably some issue with C++ version you're giving cmake. For now just use the function from C

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.

None yet

1 participant