[Beignet] [PATCH] CMake: Rename libcl.so to libOpenCL.so and use versioning
Steven Newbury
steve at snewbury.org.uk
Sun Apr 21 04:32:40 PDT 2013
In order to be compatible with everybody else, the library should be
called libOpenCL. Likewise, the versioning info should match that used
by other OpenCL providers.
Signed-off-by: Steven Newbury <steve at snewbury.org.uk>
---
--- src/CMakeLists.txt.orig 2013-04-20 23:08:58.505589079 +0100
+++ src/CMakeLists.txt 2013-04-20 23:10:48.338367959 +0100
@@ -46,8 +46,8 @@
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic")
link_directories (${LLVM_LIBRARY_DIR})
-add_library(cl SHARED ${OPENCL_SRC})
-target_link_libraries(
- cl
+add_library(OpenCL SHARED ${OPENCL_SRC})
+set_target_properties(OpenCL PROPERTIES VERSION 1.0.0 SOVERSION 1)
+target_link_libraries(OpenCL
gbe
${XLIB_LIBRARY}
@@ -58,4 +58,4 @@
${OPENGL_LIBRARIES}
${OPTIONAL_EGL_LIBRARY}
${GBM_LIBRARY})
-install (TARGETS cl LIBRARY DESTINATION lib)
+install (TARGETS OpenCL LIBRARY DESTINATION ${LIB_INSTALL_DIR})
--- backend/src/CMakeLists.txt~ 2013-04-20 22:30:15.000000000 +0100
+++ backend/src/CMakeLists.txt 2013-04-20 23:13:21.021277236 +0100
@@ -115,6 +115,6 @@
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_DL_LIBS})
-install (TARGETS gbe LIBRARY DESTINATION lib)
+install (TARGETS gbe LIBRARY DESTINATION ${LIB_INSTALL_DIR})
install (FILES backend/program.h DESTINATION include/gen)
--- utests/CMakeLists.txt~ 2013-04-21 09:43:26.000000000 +0100
+++ utests/CMakeLists.txt 2013-04-21 09:44:26.353806413 +0100
@@ -79,7 +79,7 @@
ADD_LIBRARY(utests SHARED ${utests_sources})
-TARGET_LINK_LIBRARIES(utests cl m ${OPENGL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+TARGET_LINK_LIBRARIES(utests OpenCL m ${OPENGL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
ADD_EXECUTABLE(utest_run utest_run.cpp)
TARGET_LINK_LIBRARIES(utest_run utests)
More information about the Beignet
mailing list