diff --git a/StreamDeckSDK.cmake.in b/StreamDeckSDK.cmake.in index d436625..619ce3b 100644 --- a/StreamDeckSDK.cmake.in +++ b/StreamDeckSDK.cmake.in @@ -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()