Bad file install locations
sambler opened this issue · comments
Problem
The 1.13.6.1 release installs some new files that are not in acceptable locations.
All .cmake
files should be installed into one location. Extra support scripts should be installed under share
not at the top of the filesystem.
Expected behavior:
A clean install with files in expected locations
Actual behavior:
cmake config files and extra support scripts are installed into two locations.
Versions
- OSL branch/version: 1.13.6.1
Solution
llvm_macros.cmake
should have DESTINATION ${OSL_CONFIG_INSTALL_DIR}
to put it with the other cmake files.
The serialize-bc.py
script would be better installed somewhere like DESTINATION ${CMAKE_INSTALL_DATADIR}/build-scripts
Confirmed here, with latest 1.13.7.0: llvm_macros.cmake ends up in /usr/cmake and serialize-bc.py in /usr/build-scripts.
The llvm_macros.cmake place you propose is OK AFAICT, but the serialize-bc.py one does not look right: if I'm not reading wrongly, llvm_macroscmake calls serialize-bc.py with the following statement:
`# Serialize the linked bitcode into a CPP file
set ( src_bc_cpp "${CMAKE_CURRENT_BINARY_DIR}/${output_name}.bc.cpp" )
add_custom_command ( OUTPUT ${src_bc_cpp}
COMMAND ${Python_EXECUTABLE} "${_THIS_MODULE_BASE_DIR}/../build-scripts/serialize-bc.py"
${linked_src_bc} ${src_bc_cpp} ${output_name}
DEPENDS "${_THIS_MODULE_BASE_DIR}/../build-scripts/serialize-bc.py" ${linked_src_bc}
${exec_headers} ${PROJECT_PUBLIC_HEADERS}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" )`
So you cannot put the python file everywhere: the build-scripts should go in a directory above the one where llvm_macros.cmake resides, otherwise the above command won't work...
However this is a weird path for python files, at least in my distro.