Add naive make install for Linux
This enables a `sudo make install` that copies the build directory to the PREFIX directory (/opt/OpenVR-AdvancedSettings/AdvancedSettings by default). The entire directory is being copied because Qt is incredibly weird about how the INSTALLS variable works. From testing it appears that only files that exist before the build process has started (even the file_copy process) will be eligible for installation. If the /OpenVR-AdvancedSettings/ directory is excluded, Qt will attempt to remove the /opt/ folder on `make uninstall`, this is obviously not desirable.
This commit is contained in:
@@ -94,3 +94,16 @@ win32 {
|
||||
# for running executables.
|
||||
QMAKE_POST_LINK = cmd /c $$WINDEPLOYQT_FULL_LINE
|
||||
}
|
||||
|
||||
# Add make install support
|
||||
unix {
|
||||
isEmpty(PREFIX){
|
||||
PREFIX = /opt/OpenVR-AdvancedSettings
|
||||
}
|
||||
|
||||
application.path = $$PREFIX
|
||||
application.files = $$COPY_DEST_DIR
|
||||
|
||||
INSTALLS += application
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user