Skip to content

Commit

Permalink
add set_default_install_dir_to_streamdeck_plugin_dir() to streamdecks…
Browse files Browse the repository at this point in the history
…dk.cmake
  • Loading branch information
fredemmott committed May 8, 2021
1 parent fe5a09e commit e166232
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions StreamDeckSDK.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,20 @@ elseif(WIN32)
elseif(UNIX AND NOT APPLE)
target_link_libraries(StreamDeckSDK INTERFACE pthread)
endif()

set(
STREAMDECK_PLUGIN_DIR
${STREAMDECK_PLUGIN_DIR}
CACHE PATH "Path to this system's streamdeck plugin directory"
)

function(set_default_install_dir_to_streamdeck_plugin_dir)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(
CMAKE_INSTALL_PREFIX
"${STREAMDECK_PLUGIN_DIR}/${CMAKE_PROJECT_NAME}"
CACHE PATH "See cmake documentation"
FORCE
)
endif()
endfunction()

0 comments on commit e166232

Please sign in to comment.