Commit a8570809 authored by Marian Triebe's avatar Marian Triebe

Complete quoting for CMake parameters, relates #182.

parent 9c3fa039
...@@ -13,20 +13,24 @@ if (OPENCL_LIBRARIES) ...@@ -13,20 +13,24 @@ if (OPENCL_LIBRARIES)
src/program.cpp) src/program.cpp)
# build shared library if not compiling static only # build shared library if not compiling static only
if(NOT "${CAF_BUILD_STATIC_ONLY}" STREQUAL "yes") if(NOT "${CAF_BUILD_STATIC_ONLY}" STREQUAL "yes")
add_library(libcaf_opencl SHARED ${LIBCAF_OPENCL_SRCS} ${LIBCAF_OPENCL_HDRS} ${OPENCL_INCLUDE_DIR}) add_library(libcaf_opencl SHARED ${LIBCAF_OPENCL_SRCS}
target_link_libraries(libcaf_opencl ${LD_FLAGS} ${LIBCAF_CORE_LIBRARY} ${OPENCL_LIBRARIES}) ${LIBCAF_OPENCL_HDRS}
set(LIBRARY_SOVERSION ${CAF_VERSION_MAJOR}) ${OPENCL_INCLUDE_DIR})
target_link_libraries(libcaf_opencl ${LD_FLAGS}
${LIBCAF_CORE_LIBRARY}
${OPENCL_LIBRARIES})
set(LIBRARY_SOVERSION "${CAF_VERSION_MAJOR}")
set_target_properties(libcaf_opencl set_target_properties(libcaf_opencl
PROPERTIES PROPERTIES
SOVERSION ${LIBRARY_SOVERSION} SOVERSION "${LIBRARY_SOVERSION}"
VERSION ${CAF_VERSION} VERSION "${CAF_VERSION}"
OUTPUT_NAME caf_opencl) OUTPUT_NAME caf_opencl)
if(NOT MINGW) if(NOT MINGW)
install(TARGETS libcaf_opencl LIBRARY DESTINATION lib) install(TARGETS libcaf_opencl LIBRARY DESTINATION lib)
endif() endif()
endif() endif()
# build static library only if --build-static or --build-static-only was set # build static library only if --build-static or --build-static-only was set
if("${CAF_BUILD_STATIC_ONLY}" STREQUAL "yes" OR "${CAF_BUILD_STATIC}" STREQUAL "yes") if(CAF_BUILD_STATIC_ONLY OR CAF_BUILD_STATIC)
add_library(libcaf_openclStatic STATIC ${LIBCAF_OPENCL_HDRS} ${LIBCAF_OPENCL_SRCS}) add_library(libcaf_openclStatic STATIC ${LIBCAF_OPENCL_HDRS} ${LIBCAF_OPENCL_SRCS})
set_target_properties(libcaf_openclStatic PROPERTIES OUTPUT_NAME caf_opencl_static) set_target_properties(libcaf_openclStatic PROPERTIES OUTPUT_NAME caf_opencl_static)
install(TARGETS libcaf_openclStatic ARCHIVE DESTINATION lib) install(TARGETS libcaf_openclStatic ARCHIVE DESTINATION lib)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment