@@ -261,6 +261,11 @@ target_link_libraries(example_sasum ${OPENCL_LIBRARIES} clBLAS)
261
261
set_property ( TARGET example_sasum PROPERTY FOLDER "Samples" )
262
262
263
263
# CPack configuration; include the executable into the package
264
+ if ( WIN32 )
265
+ set ( CLBLAS_EXAMPLE_INSTALL_DESTINATION bin${SUFFIX_BIN} )
266
+ else ( )
267
+ set ( CLBLAS_EXAMPLE_INSTALL_DESTINATION share/clBLAS/samples )
268
+ endif ()
264
269
install ( TARGETS example_sgemm example_sgemv example_ssymv example_ssyrk
265
270
example_ssyr2k example_strmm example_strsm
266
271
example_strmv example_strsv example_sger example_cher example_ssyr
@@ -274,18 +279,20 @@ install( TARGETS example_sgemm example_sgemv example_ssymv example_ssyrk
274
279
example_snrm2 example_sasum example_isamax
275
280
276
281
version
277
- if ( WIN32 )
278
- RUNTIME DESTINATION bin${SUFFIX_BIN}
279
- else ( )
280
- RUNTIME DESTINATION share/clBLAS/samples
281
- endif ( )
282
- LIBRARY DESTINATION lib${SUFFIX_LIB}
283
- ARCHIVE DESTINATION lib${SUFFIX_LIB}/import
282
+ RUNTIME DESTINATION ${CLBLAS_EXAMPLE_INSTALL_DESTINATION}
283
+ LIBRARY DESTINATION lib${SUFFIX_LIB}
284
+ ARCHIVE DESTINATION lib${SUFFIX_LIB}/import
284
285
)
285
286
286
287
configure_file ( "${PROJECT_SOURCE_DIR} /samples/CMakeLists.pack"
287
288
"${PROJECT_BINARY_DIR} /samples/CMakeLists.txt" COPYONLY )
288
289
290
+ if ( WIN32 )
291
+ set ( CLBLAS_SAMPLE_INSTALL_DESTINATION samples )
292
+ else ( )
293
+ set ( CLBLAS_SAMPLE_INSTALL_DESTINATION share/clBLAS/samples/src )
294
+ endif ()
295
+
289
296
install (FILES
290
297
example_sgemv.c
291
298
example_ssymv.c
@@ -336,9 +343,5 @@ install(FILES
336
343
clBlasVersion.c
337
344
${PROJECT_BINARY_DIR} /samples/CMakeLists.txt
338
345
339
- if ( WIN32 )
340
- DESTINATION samples
341
- else ( )
342
- DESTINATION share/clBLAS/samples/src
343
- endif ()
346
+ DESTINATION ${CLBLAS_SAMPLE_INSTALL_DESTINATION}
344
347
)
0 commit comments