source: CLRX/CLRadeonExtender/trunk/samples/CMakeLists.txt @ 3450

Last change on this file since 3450 was 3450, checked in by matszpk, 2 years ago

CLRadeonExtender: Add new library: CLRXCLHelper that facilitate creating binary/program for OpenCL. Use CLRXCLHelper in samples.

  • Property svn:mime-type set to text/plain
File size: 2.1 KB
Line 
1####
2#  CLRadeonExtender - Unofficial OpenCL Radeon Extensions Library
3#  Copyright (C) 2014-2017 Mateusz Szpakowski
4#
5#  This library is free software; you can redistribute it and/or
6#  modify it under the terms of the GNU Lesser General Public
7#  License as published by the Free Software Foundation; either
8#  version 2.1 of the License, or (at your option) any later version.
9#
10#  This library is distributed in the hope that it will be useful,
11#  but WITHOUT ANY WARRANTY; without even the implied warranty of
12#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13#  Lesser General Public License for more details.
14#
15#  You should have received a copy of the GNU Lesser General Public
16#  License along with this library; if not, write to the Free Software
17#  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18####
19
20CMAKE_MINIMUM_REQUIRED(VERSION 2.8.1)
21
22ADD_LIBRARY(SamplesCLUtils STATIC CLUtils.cpp)
23
24SET(LINK_LIBRARIES SamplesCLUtils OpenCL CLRXCLHelper${PROGRAM_LIB_SUFFIX}
25        CLRXAmdAsm${PROGRAM_LIB_SUFFIX}
26        CLRXAmdBin${PROGRAM_LIB_SUFFIX} CLRXUtils${PROGRAM_LIB_SUFFIX}
27        ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
28
29SET(SAMPLESBINDIR share/CLRX/samples)
30
31ADD_EXECUTABLE(VectorAdd VectorAdd.cpp)
32TARGET_LINK_LIBRARIES(VectorAdd ${LINK_LIBRARIES} ${MATHLIB})
33
34INSTALL(TARGETS VectorAdd RUNTIME DESTINATION ${SAMPLESBINDIR})
35
36IF(PNG_FOUND)
37    ADD_EXECUTABLE(ImageMix ImageMix.cpp)
38    TARGET_LINK_LIBRARIES(ImageMix ${LINK_LIBRARIES} ${PNG_LIBRARIES})
39   
40    INSTALL(TARGETS ImageMix RUNTIME DESTINATION ${SAMPLESBINDIR})
41    INSTALL(FILES "${PROJECT_SOURCE_DIR}/samples/image1.png" DESTINATION ${SAMPLESBINDIR})
42    INSTALL(FILES "${PROJECT_SOURCE_DIR}/samples/image2.png" DESTINATION ${SAMPLESBINDIR})
43ENDIF(PNG_FOUND)
44
45ADD_EXECUTABLE(ReverseBits ReverseBits.cpp)
46TARGET_LINK_LIBRARIES(ReverseBits ${LINK_LIBRARIES})
47
48INSTALL(TARGETS ReverseBits RUNTIME DESTINATION ${SAMPLESBINDIR})
49
50ADD_EXECUTABLE(GenericPtr GenericPtr.cpp)
51TARGET_LINK_LIBRARIES(GenericPtr ${LINK_LIBRARIES})
52
53INSTALL(TARGETS GenericPtr RUNTIME DESTINATION ${SAMPLESBINDIR})
Note: See TracBrowser for help on using the repository browser.