CESNET/GPUJPEG

Support custom install folder on windows

Closed this issue · 1 comments

I do not think it's a standard to enforce cmake install prefix to be control inside the library itself by doing

if(WIN32)
    set(CMAKE_INSTALL_PREFIX "$ENV{ProgramFiles}/${CMAKE_PROJECT_NAME}")
    string(REPLACE "\\" "/" CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
endif()

If someone provide the CMAKE_INSTALL_PREFIX as parameter it should take precedence over this code.
Some people do not have access permission on program files

I basically agree but it did have some rationale. IIRC the installation defaulted to "C:\Program Files (x86)" without that even for 64-build and I've just quick-tested that it still does with CMake in current MSVS. I do not remember if it had any adverse implications but I think it is incorrect, anyway.

I've created a patch that should set/override it only if set to default, as you asked.