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

Travis: macOS-related problem trying to bump SDL to 2.0.12 #386

Closed
crudelios opened this issue Mar 22, 2020 · 3 comments · Fixed by #388
Closed

Travis: macOS-related problem trying to bump SDL to 2.0.12 #386

crudelios opened this issue Mar 22, 2020 · 3 comments · Fixed by #388
Labels

Comments

@crudelios
Copy link
Collaborator

I'm trying to update SDL to 2.0.12 in travis. Everything is working except for mac OS, which throws the following error during make install:

CMake Error at /usr/local/Cellar/cmake/3.15.5/share/cmake/Modules/BundleUtilities.cmake:452 (message):
  otool -l failed: 1
  
  /Applications/Xcode-9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump:
  '@rpath/hidapi.framework/Versions/A/hidapi': No such file or directory

It seems SDL 2.0.12 now requires hidapi, at least for mac. However, since I don't use macOS, I don't really know how to fix this.

So, does anyone have any suggestions?

@crudelios crudelios added the bug label Mar 22, 2020
@bvschaik
Copy link
Owner

bvschaik commented Mar 22, 2020

I've tried it out and encountered the same error. Adding this code at line 628 of CMakeLists.txt fixes it:

    # if SDL2 library is a framework, we need to indicate to CMake
    # the path to its dependencies. SDL2_LIBRARY contains two parts.
    # Example: /Library/Frameworks/SDL2.framework;-framework Cocoa
    # So strip out everything after the ';'
    string(REGEX REPLACE ";.*$" "" SDL2_LIB_DIR "${SDL2_LIBRARY}")
    if(EXISTS "${SDL2_LIB_DIR}/Versions/A/Frameworks")
        set(DIRS "${DIRS};${SDL2_LIB_DIR}/Versions/A/Frameworks")
    endif()

I did notice that the cursor's transparent bits are no longer transparent in SDL2.0.12. Is that also the case on other platforms?

@crudelios
Copy link
Collaborator Author

I did notice that the cursor's transparent bits are no longer transparent in SDL2.0.12. Is that also the case on other platforms?

Confirmed in Windows.

@crudelios
Copy link
Collaborator Author

I have come up with a fix to the transparency issue by manually converting the image data from string to valid colors instead of using a palette.

It's compatible with previous SDL versions and as a bonus, the conversion should be faster.

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

Successfully merging a pull request may close this issue.

2 participants