Skip to content

Commit

Permalink
Provisional fix for install of HUT folder
Browse files Browse the repository at this point in the history
The install should be defined within SC, and not within the submodule, to allow variables like auxresourcesdir to be used without reassigning them
  • Loading branch information
bagong committed Jun 2, 2016
1 parent 2f599f2 commit b11c66a
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,25 @@ if( HID_EXAMPLE_OSC )
endif()

if( HID_DEBUG_PARSER OR HID_INSTALL_HUT )
# provisional to avoid having to commit to sc master while the HID submodule
# is not final/added to master
# the sc-settings for cmake_install_prefix and scappauxresourcesdir are not
# visible in this scope
if(APPLE)
set(HID_HUT_PATH "${CMAKE_INSTALL_PREFIX}/${scappauxresourcesdir}/HID_Support" CACHE STRING "Installation path for the HID usage tables")
else(APPLE)
set(HID_HUT_PATH "${CMAKE_INSTALL_PREFIX}/${auxresourcesdir}/HID_Support" CACHE STRING "Installation path for the HID usage tables")
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
SET(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/Install")
endif()
# this will break if scappbundlename is reassigned in SC
# similar problem in editors/sc-ide/CMakeLists.txt 284
set(scappbundlename "SuperCollider")
set(scappauxresourcesdir "${scappbundlename}/${scappbundlename}.app/Contents/Resources")
set(HID_HUT_PATH "${CMAKE_INSTALL_PREFIX}/${scappauxresourcesdir}/HID_Support")
elseif(WIN32)
set(auxresourcesdir "SuperCollider" CACHE STRING "Resources directory")
set(HID_HUT_PATH "${CMAKE_INSTALL_PREFIX}/${auxresourcesdir}/HID_Support")
else()
set(auxresourcesdir "share/SuperCollider" CACHE STRING "Resources directory")
set(HID_HUT_PATH "${CMAKE_INSTALL_PREFIX}/${auxresourcesdir}/HID_Support")
endif(APPLE)
install(DIRECTORY hut
DESTINATION ${HID_HUT_PATH}
Expand Down

0 comments on commit b11c66a

Please sign in to comment.