Fix lib-Prefixless OpenCL library linking
This commit is contained in:
parent
6eab5153f5
commit
ab4299b595
1 changed files with 6 additions and 2 deletions
|
@ -22,7 +22,10 @@ ffbuild_dockerbuild() {
|
|||
|
||||
mkdir build && cd build
|
||||
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" -DOPENCL_ICD_LOADER_HEADERS_DIR="$FFBUILD_PREFIX"/include -DOPENCL_ICD_LOADER_BUILD_SHARED_LIBS=OFF -DOPENCL_ICD_LOADER_DISABLE_OPENCLON12=ON -DOPENCL_ICD_LOADER_PIC=ON -DOPENCL_ICD_LOADER_BUILD_TESTING=OFF -DBUILD_TESTING=OFF ..
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE="$FFBUILD_CMAKE_TOOLCHAIN" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$FFBUILD_PREFIX" \
|
||||
-DOPENCL_ICD_LOADER_HEADERS_DIR="$FFBUILD_PREFIX"/include -DOPENCL_ICD_LOADER_BUILD_SHARED_LIBS=OFF \
|
||||
-DOPENCL_ICD_LOADER_DISABLE_OPENCLON12=ON -DOPENCL_ICD_LOADER_PIC=ON \
|
||||
-DOPENCL_ICD_LOADER_BUILD_TESTING=OFF -DBUILD_TESTING=OFF ..
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
|
@ -34,12 +37,13 @@ ffbuild_dockerbuild() {
|
|||
echo "Name: OpenCL" >> OpenCL.pc
|
||||
echo "Description: OpenCL ICD Loader" >> OpenCL.pc
|
||||
echo "Version: 9999" >> OpenCL.pc
|
||||
echo "Libs: -L\${libdir} -lOpenCL" >> OpenCL.pc
|
||||
echo "Cflags: -I\${includedir}" >> OpenCL.pc
|
||||
|
||||
if [[ $TARGET == linux* ]]; then
|
||||
echo "Libs: -L\${libdir} -lOpenCL" >> OpenCL.pc
|
||||
echo "Libs.private: -ldl" >> OpenCL.pc
|
||||
elif [[ $TARGET == win* ]]; then
|
||||
echo "Libs: -L\${libdir} -l:OpenCL.a" >> OpenCL.pc
|
||||
echo "Libs.private: -lole32 -lshlwapi -lcfgmgr32" >> OpenCL.pc
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue