We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A few fixes to build the plugins on OSX:
#if defined(__APPLE__) #define GL_SILENCE_DEPRECATION #include <OpenGL/gl3.h> #else #include <GL/glew.h> #include <GL/gl.h> #endif
Some changes in CMakeList: 2. GLEW is not necessary on OSX so I have removed it for CMakeList. Also I have noticed that SDL is not needed on OSX.
if(WIN32) # link specific win32 libraries target_link_libraries(GodotShaders GLEW::GLEW) else() if(APPLE) target_link_libraries(GodotShaders "-framework CoreFoundation -framework Cocoa") else() # link linux libraries target_link_libraries(GodotShaders ${GLEW_LIBRARIES}) endif() endif()
set_target_properties(GodotShaders PROPERTIES OUTPUT_NAME "plugin") set_target_properties(GodotShaders PROPERTIES PREFIX "") if(APPLE) set_target_properties(GodotShaders PROPERTIES SUFFIX ".so") endif
# glew find_package(GLEW QUIET) if(NOT GLEW_FOUND) FetchContent_Declare( glew URL "https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip" ) FetchContent_GetProperties(glew) if(NOT glew_POPULATED) FetchContent_Populate(glew) # Top level doesn't contain the CMakeLists.txt, it is in the "build/cmake" subdirectory add_subdirectory(${glew_SOURCE_DIR}/build/cmake ${glew_BINARY_DIR}) endif() set(GLEW_INCLUDE_DIRS ${glew_SOURCE_DIR}/include) set(GLEW_LIBRARY_DIRS ${glew_BINARY_DIR}/libs) set(GLEW_LIBRARIES glew_s) endif() # glm find_package(GLM QUIET) if(NOT GLM_FOUND) FetchContent_Declare( glm GIT_REPOSITORY "https://github.com/g-truc/glm.git" GIT_TAG "0.9.9.7" ) FetchContent_MakeAvailable(glm) set(GLM_INCLUDE_DIRS ${glm_SOURCE_DIR}) set(GLM_LIBRARY_DIRS ${glm_BINARY_DIR}) endif()
Regards Pawel
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A few fixes to build the plugins on OSX:
Some changes in CMakeList:
2. GLEW is not necessary on OSX so I have removed it for CMakeList. Also I have noticed that SDL is not needed on OSX.
Regards
Pawel
The text was updated successfully, but these errors were encountered: