# 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()
install(CODE "
include(BundleUtilities)
set(BU_CHMOD_BUNDLE_ITEMS ON)
fixup_bundle(\"${CMAKE_BINARY_DIR}/${MPEngine}.app\" \"\" \"${DIRS}\")
"
COMPONENT Runtime)```
This has something to do with rpath for sdl2, which now requires hidapi on mac OS X. The fix was found here:
https://github.com/bvschaik/julius/issues/386
Adding this to codemp/CMakeLists.txt fixes it. Changed:
to this