source: CLRX/CLRadeonExtender/trunk/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: 14.8 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
22PROJECT(CLRadeonExtender)
23
24SET(CLRX_MAJOR_VERSION 0)
25SET(CLRX_MINOR_VERSION 1)
26SET(CLRX_MICRO_VERSION 5)
27SET(CLRX_VERSION_REVISION)
28SET(CLRX_VERSION ${CLRX_MAJOR_VERSION}.${CLRX_MINOR_VERSION}.${CLRX_MICRO_VERSION}${CLRX_VERSION_REVISION})
29SET(CLRX_LIB_VERSION ${CLRX_MAJOR_VERSION}.${CLRX_MINOR_VERSION}.${CLRX_MICRO_VERSION})
30
31ENABLE_LANGUAGE(CXX)
32
33SET(EXTRA_OPTS CACHE STRING "add extra options")
34SET(CPU_ARCH CACHE STRING "Set CPU architecture option")
35OPTION(GCC5CXX11NEWABI "Force new GCC 5 C++11 ABI" OFF)
36IF(GCC5CXX11NEWABI)
37    MESSAGE(STATUS "GCC5 C++11 New ABI enabled")
38    SET(EXTRA_PACK_SUFFIX "-gcc5")
39ENDIF(GCC5CXX11NEWABI)
40
41#####
42# packacing
43SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Unofficial OpenCL Radeon extensions")
44SET(CPACK_PACKAGE_VENDOR "matszpk")
45SET(CPACK_PACKAGE_MAINTAINER "matszpk")
46SET(CPACK_PACKAGE_VERSION_MAJOR ${CLRX_MAJOR_VERSION})
47SET(CPACK_PACKAGE_VERSION_MINOR ${CLRX_MINOR_VERSION})
48SET(CPACK_PACKAGE_VERSION_PATCH ${CLRX_MICRO_VERSION})
49SET(CPACK_PACKAGE_VERSION ${CLRX_VERSION})
50SET(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
51IF((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_CL_64) AND NOT BUILD_32BIT)
52SET(CPACK_PACKAGE_FILE_NAME CLRadeonExtender-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}-x64${EXTRA_PACK_SUFFIX})
53ELSE((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_CL_64) AND NOT BUILD_32BIT)
54SET(CPACK_PACKAGE_FILE_NAME CLRadeonExtender-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}-x86${EXTRA_PACK_SUFFIX})
55ENDIF((CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR CMAKE_CL_64) AND NOT BUILD_32BIT)
56
57INCLUDE(CPack)
58
59######
60## end packaging
61
62LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
63
64INCLUDE(CheckFunctionExists)
65INCLUDE(CheckLibraryExists)
66INCLUDE(CheckIncludeFileCXX)
67INCLUDE(CheckCCompilerFlag)
68INCLUDE(CheckCXXCompilerFlag)
69
70CHECK_CXX_COMPILER_FLAG("-std=gnu++11" HAVE_GNU11_FLAG)
71
72# workaround for
73SET(CMAKE_REQUIRED_FLAGS "-std=gnu++11")
74CHECK_INCLUDE_FILE_CXX(iostream HAVE_GNU11_IOSTREAM)
75UNSET(CMAKE_REQUIRED_FLAGS)
76
77IF(HAVE_GNU11_FLAG AND HAVE_GNU11_IOSTREAM)
78    SET(CPP_STANDARD "-std=gnu++11")
79    SET(HAVE_GNU11 1)
80ELSE(HAVE_GNU11_FLAG AND HAVE_GNU11_IOSTREAM)
81    SET(CPP_STANDARD "-std=c++11")
82ENDIF(HAVE_GNU11_FLAG AND HAVE_GNU11_IOSTREAM)
83
84MESSAGE(STATUS "Use standard ${CPP_STANDARD} for ${CMAKE_CXX_COMPILER}")
85
86IF(GCC5CXX11NEWABI)
87    ADD_DEFINITIONS(-D_GLIBCXX_USE_CXX11_ABI=1)
88ENDIF(GCC5CXX11NEWABI)
89
90### 32-bit compilation option
91OPTION(BUILD_32BIT "Build 32-bit version" OFF)
92
93IF(CPU_ARCH)
94    IF(MSVC)
95        SET(EXTRA_OPTS "${EXTRA_OPTS} /arch:${CPU_ARCH}")
96    ELSE(MSVC)
97        SET(EXTRA_OPTS "${EXTRA_OPTS} -march=${CPU_ARCH}")
98    ENDIF(MSVC)
99ENDIF(CPU_ARCH)
100
101IF(BUILD_32BIT)
102    SET(CMAKE_CXX_FLAGS "-Wall -m32 ${EXTRA_OPTS} ${CPP_STANDARD}")
103    SET(CMAKE_CXX_FLAGS_DEBUG "-Wall -m32 ${EXTRA_OPTS} ${CPP_STANDARD} -g -O0 -DDEBUG=1")
104    SET(CMAKE_CXX_FLAGS_DEBUGCOV
105        "-Wall -m32 ${EXTRA_OPTS} ${CPP_STANDARD} -g -O0 -DDEBUG=1 --coverage")
106    SET(CMAKE_CXX_FLAGS_GCCSAN
107    "-Wall -m32 ${EXTRA_OPTS} ${CPP_STANDARD} -g -O0 -DDEBUG=1 -fstack-protector-all -fsanitize=address")
108    SET(CMAKE_CXX_FLAGS_GCCSSP
109        "-Wall -m32 ${EXTRA_OPTS} ${CPP_STANDARD} -g -O0 -DDEBUG=1 -fstack-protector-all")
110    SET(CMAKE_CXX_FLAGS_RELEASE
111        "-Wall -m32 ${EXTRA_OPTS} ${CPP_STANDARD} -O2 -fomit-frame-pointer")
112    SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
113        "-Wall -m32 ${EXTRA_OPTS} ${CPP_STANDARD} -g -O2 -funroll-loops -DDEBUG=1")
114    SET(CMAKE_CXX_FLAGS_RELWITHPROFILE
115        "-Wall -m32 ${EXTRA_OPTS} ${CPP_STANDARD} -g -O2 -pg -funroll-loops")
116ELSE(BUILD_32BIT)
117    IF(MSVC)
118    SET(CMAKE_CXX_FLAGS "/W1 ${EXTRA_OPTS} /EHsc")
119    SET(CMAKE_CXX_FLAGS_DEBUG "/W1 ${EXTRA_OPTS} /EHsc /Zi /Od /DDEBUG=1")
120    SET(CMAKE_CXX_FLAGS_RELEASE "/W1 ${EXTRA_OPTS} /EHsc /O2")
121    SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/W1 ${EXTRA_OPTS} /EHsc /Zi /O2 /DDEBUG=1")
122    ELSE(MSVC)
123    SET(CMAKE_CXX_FLAGS "-Wall ${EXTRA_OPTS} ${CPP_STANDARD}")
124    SET(CMAKE_CXX_FLAGS_DEBUG "-Wall ${EXTRA_OPTS} ${CPP_STANDARD} -g -O0 -DDEBUG=1")
125    SET(CMAKE_CXX_FLAGS_DEBUGCOV
126        "-Wall ${EXTRA_OPTS} ${CPP_STANDARD} -g -O0 -DDEBUG=1 --coverage")
127    SET(CMAKE_CXX_FLAGS_GCCSAN
128        "-Wall ${EXTRA_OPTS} ${CPP_STANDARD} -g -O0 -DDEBUG=1 -fstack-protector-all -fsanitize=address")
129    SET(CMAKE_CXX_FLAGS_GCCSSP
130        "-Wall ${EXTRA_OPTS} ${CPP_STANDARD} -g -O0 -DDEBUG=1 -fstack-protector-all")
131    SET(CMAKE_CXX_FLAGS_RELEASE
132        "-Wall ${EXTRA_OPTS} ${CPP_STANDARD} -O2 -fomit-frame-pointer")
133    SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO
134        "-Wall ${EXTRA_OPTS} ${CPP_STANDARD} -g -O2 -funroll-loops -DDEBUG=1")
135    SET(CMAKE_CXX_FLAGS_RELWITHPROFILE
136        "-Wall ${EXTRA_OPTS} ${CPP_STANDARD} -g -O2 -pg -funroll-loops")
137    ENDIF(MSVC)
138ENDIF(BUILD_32BIT)
139
140# check system bitness
141TRY_COMPILE(HAVE_64BIT "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/Check64Bit.cpp")
142IF(HAVE_64BIT)
143    MESSAGE(STATUS "Compile for 64-bit system")
144ELSE(HAVE_64BIT)
145    MESSAGE(STATUS "Compile for 32-bit system")
146ENDIF(HAVE_64BIT)
147
148# determine library directory name
149IF(NOT LIB_INSTALL_DIR)
150    IF(HAVE_64BIT AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
151        SET(LIB_INSTALL_DIR "lib64")
152    ELSE(HAVE_64BIT AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
153        SET(LIB_INSTALL_DIR "lib")
154    ENDIF(HAVE_64BIT AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
155    MESSAGE(STATUS "Using library install dirname ${LIB_INSTALL_DIR}")
156ENDIF(NOT LIB_INSTALL_DIR)
157
158IF(IS_DIRECTORY "/usr/lib/x86_64-linux-gnu/amdgpu-pro" OR
159    IS_DIRECTORY "/usr/lib/i386-linux-gnu/amdgpu-pro")
160    SET(HAVE_UBUNTU_GPUPRO TRUE)
161    MESSAGE(STATUS "AMDGPU-PRO for Ubuntu is found")
162ENDIF(IS_DIRECTORY "/usr/lib/x86_64-linux-gnu/amdgpu-pro" OR
163    IS_DIRECTORY "/usr/lib/i386-linux-gnu/amdgpu-pro")
164IF(IS_DIRECTORY "/opt/amdgpu-pro/lib/x86_64-linux-gnu" OR
165        IS_DIRECTORY "/opt/amdgpu-pro/lib/i386-linux-gnu")
166    SET(HAVE_GPUPRO_NEW TRUE)
167    MESSAGE(STATUS "New AMDGPU-PRO is found")
168ENDIF(IS_DIRECTORY "/opt/amdgpu-pro/lib/x86_64-linux-gnu" OR
169        IS_DIRECTORY "/opt/amdgpu-pro/lib/i386-linux-gnu")
170IF (NOT HAVE_GPUPRO_NEW AND NOT HAVE_UBUNTU_GPUPRO)
171    IF(IS_DIRECTORY "/opt/amdgpu-pro/lib64" OR IS_DIRECTORY "/opt/amdgpu-pro/lib")
172        SET(HAVE_GPUPRO_SLES TRUE)
173        MESSAGE(STATUS "SLES AMDGPU-PRO is found")
174    ENDIF(IS_DIRECTORY "/opt/amdgpu-pro/lib64" OR IS_DIRECTORY "/opt/amdgpu-pro/lib")
175ENDIF(NOT HAVE_GPUPRO_NEW AND NOT HAVE_UBUNTU_GPUPRO)
176
177IF("${PROJECT_SOURCE_DIR}" MATCHES "${PROJECT_BINARY_DIR}")
178    MESSAGE("Please do an out-of-tree build:")
179    MESSAGE("rm -f CMakeCache.txt; mkdir -p default; cd default; cmake ..; make")
180    MESSAGE(FATAL_ERROR "in-tree-build detected")
181ENDIF("${PROJECT_SOURCE_DIR}" MATCHES "${PROJECT_BINARY_DIR}")
182
183SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
184SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}")
185
186OPTION(NO_STATIC "Disable static during compiling" OFF)
187
188INCLUDE(PortUtils)
189IF(WIN32)
190  SET(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
191ENDIF(WIN32)
192
193####
194# Documentation
195####
196OPTION(BUILD_DOCUMENTATION "Build whole documentation" OFF)
197OPTION(BUILD_DOXYGEN "Use Doxygen to create the HTML based API documentation" OFF)
198OPTION(BUILD_MANUAL "Use Pod2Man to create the Unix manuals" OFF)
199OPTION(BUILD_CLRXDOC "Use markdown_py to create offline wiki pages" OFF)
200
201IF(BUILD_DOCUMENTATION)
202  SET(BUILD_DOXYGEN ON)
203  SET(BUILD_MANUAL ON)
204  SET(BUILD_CLRXDOC ON)
205ENDIF(BUILD_DOCUMENTATION)
206
207####
208# rules to build doxygen and clrx doc is in proper CMakeLists.txt files in subdirectories
209####
210
211IF(BUILD_MANUAL)
212    INCLUDE(Pod2Man)
213    ADD_MANPAGE_TARGET()
214ENDIF(BUILD_MANUAL)
215####
216# Documentation
217####
218
219INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}")
220INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
221
222OPTION(NO_OPENCL "Do not use OpenCL" OFF)
223OPTION(NO_CLWRAPPER "Do not enable CLRXWrapper" OFF)
224
225####
226# OpenCL find
227####
228SET(OPENCL_DIST_DIR "" CACHE PATH "OpenCL Distribution directory")
229
230IF(NOT OPENCL_DIST_DIR AND NOT NO_OPENCL)
231    IF(EXISTS /opt/AMDAPP)
232        SET(OPENCL_DIST_DIR "/opt/AMDAPP")
233        MESSAGE(STATUS "OpenCL AMDAPP found")
234    ELSEIF(EXISTS "/Program Files (x86)/AMD APP SDK")
235        FILE(GLOB OPENCL_DIST_DIR "/Program Files (x86)/AMD APP SDK/*")
236        MESSAGE(STATUS "OpenCL AMDAPP found")
237    ELSEIF(EXISTS "/Program Files/AMD APP SDK")
238        FILE(GLOB OPENCL_DIST_DIR "/Program Files/AMD APP SDK/*")
239        MESSAGE(STATUS "OpenCL AMDAPP found")
240    ELSEIF(EXISTS /usr/include/CL)
241        SET(OPENCL_DIST_DIR "/usr")
242        MESSAGE(STATUS "Standard OpenCL found.")
243    ENDIF(EXISTS /opt/AMDAPP)
244ENDIF(NOT OPENCL_DIST_DIR AND NOT NO_OPENCL)
245
246IF (NOT NO_OPENCL AND OPENCL_DIST_DIR)
247    SET(OPENCL_LIBRARY_DIRS "")
248    SET(OPENCL_INCLUDE_DIRS "${OPENCL_DIST_DIR}/include")
249    SET(OPENCL_LIBRARIES "OpenCL")
250    SET(HAVE_OPENCL 1)
251ENDIF(NOT NO_OPENCL AND OPENCL_DIST_DIR)
252
253# check for AMDAPP lib/x86 or lib/x86_64 libOpenCL.so file
254IF(HAVE_OPENCL)
255    IF(HAVE_64BIT)
256        IF(EXISTS ${OPENCL_DIST_DIR}/lib/x86_64/libOpenCL.so OR
257            EXISTS ${OPENCL_DIST_DIR}/lib/x86_64/OpenCL.lib)
258            SET(OPENCL_LIBRARY_DIRS "${OPENCL_DIST_DIR}/lib/x86_64")
259        ENDIF(EXISTS ${OPENCL_DIST_DIR}/lib/x86_64/libOpenCL.so OR
260            EXISTS ${OPENCL_DIST_DIR}/lib/x86_64/OpenCL.lib)
261    ELSE(HAVE_64BIT)
262        IF(EXISTS ${OPENCL_DIST_DIR}/lib/x86/libOpenCL.so OR
263            EXISTS ${OPENCL_DIST_DIR}/lib/x86/OpenCL.lib)
264            SET(OPENCL_LIBRARY_DIRS "${OPENCL_DIST_DIR}/lib/x86")
265        ENDIF(EXISTS ${OPENCL_DIST_DIR}/lib/x86/libOpenCL.so OR
266            EXISTS ${OPENCL_DIST_DIR}/lib/x86/OpenCL.lib)
267    ENDIF(HAVE_64BIT)
268    IF(HAVE_UBUNTU_GPUPRO)
269        IF(HAVE_64BIT)
270            SET(OPENCL_LIBRARY_DIRS "/usr/lib/x86_64-linux-gnu/amdgpu-pro")
271        ELSE(HAVE_64BIT)
272            SET(OPENCL_LIBRARY_DIRS "/usr/lib/i386-linux-gnu/amdgpu-pro")
273        ENDIF(HAVE_64BIT)
274    ENDIF(HAVE_UBUNTU_GPUPRO)
275    IF(HAVE_GPUPRO_NEW)
276        IF(HAVE_64BIT)
277            SET(OPENCL_LIBRARY_DIRS "/opt/amdgpu-pro/lib/x86_64-linux-gnu")
278        ELSE(HAVE_64BIT)
279            SET(OPENCL_LIBRARY_DIRS "/opt/amdgpu-pro/lib/i386-linux-gnu")
280        ENDIF(HAVE_64BIT)
281    ENDIF(HAVE_GPUPRO_NEW)
282    IF(HAVE_GPUPRO_SLES)
283        IF(HAVE_64BIT)
284            SET(OPENCL_LIBRARY_DIRS "/opt/amdgpu-pro/lib64")
285        ELSE(HAVE_64BIT)
286            SET(OPENCL_LIBRARY_DIRS "/opt/amdgpu-pro/lib")
287        ENDIF(HAVE_64BIT)
288    ENDIF(HAVE_GPUPRO_SLES)
289ENDIF(HAVE_OPENCL)
290
291###
292# end of OpenCL config
293###
294
295IF(HAVE_OPENCL)
296    MESSAGE(STATUS "OpenCL found")
297    MESSAGE(STATUS "OpenCL library dirs: " ${OPENCL_LIBRARY_DIRS})
298    MESSAGE(STATUS "OpenCL libraries: " ${OPENCL_LIBRARIES})
299    MESSAGE(STATUS "OpenCL include dirs: " ${OPENCL_INCLUDE_DIRS})
300ELSE(HAVE_OPENCL)
301    MESSAGE(STATUS "OpenCL not found")
302ENDIF(HAVE_OPENCL)
303
304## OpenGL finding
305
306IF(NOT NO_CLWRAPPER)
307    FIND_PACKAGE(OpenGL)
308    FIND_PATH(HAVE_OPENGL GL/gl.h PATHS "${OPENGL_INCLUDE_DIR}")
309    # check GL/gl.h even if OpenGL is not detected (library is not needed)
310    IF(HAVE_OPENGL)
311        MESSAGE(STATUS "OpenGL found")
312        MESSAGE(STATUS "OpenGL include dirs: " ${OPENGL_INCLUDE_DIR})
313    ELSE(HAVE_OPENGL)
314        MESSAGE(STATUS "OpenGL not found")
315    ENDIF(HAVE_OPENGL)
316ENDIF(NOT NO_CLWRAPPER)
317
318SET(CMAKE_THREAD_PREFER_PTHREAD 1)
319FIND_PACKAGE(Threads)
320
321TRY_COMPILE(HAVE_INT128 "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/Int128Detect.cpp")
322TRY_COMPILE(HAVE_CALL_ONCE "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/ThreadOnce.cpp")
323
324IF(HAVE_INT128)
325    MESSAGE(STATUS "128-bit integer arithmetic detected")
326ELSE(HAVE_INT128)
327    MESSAGE(STATUS "128-bit integer arithmetic not supported by compiler")
328ENDIF(HAVE_INT128)
329
330IF(HAVE_CALL_ONCE)
331    MESSAGE(STATUS "Environment have C++11 std::call_once")
332ELSE(HAVE_CALL_ONCE)
333    MESSAGE(STATUS "Environment have no C++11 std::call_once")
334ENDIF(HAVE_CALL_ONCE)
335
336###
337# other dependencies and checks
338###
339
340FIND_PACKAGE(PNG)
341
342IF(PNG_FOUND)
343    MESSAGE(STATUS "Png found ${PNG_INCLUDE_DIRS}")
344ENDIF(PNG_FOUND)
345
346###
347# end of other dependencies and checks
348###
349
350IF(NOT WIN32)
351    SET(MATHLIB "m")
352ENDIF(NOT WIN32)
353
354CONFIGURE_FILE("${PROJECT_SOURCE_DIR}/CLRX/Config.h.in"
355        "${PROJECT_BINARY_DIR}/CLRX/Config.h")
356
357OPTION(BUILD_TESTS "Compile tests" OFF)
358OPTION(BUILD_SAMPLES "Compile samples" OFF)
359OPTION(BUILD_STATIC_EXE "Compile static executables instead shared" OFF)
360
361# fixing CMAKE_DL_LIBS
362IF(CMAKE_DL_LIBS)
363    IF(CMAKE_DL_LIBS MATCHES "^-l")
364        SET(DL_LIBS "${CMAKE_DL_LIBS}")
365    ELSE(CMAKE_DL_LIBS MATCHES "^-l")
366        SET(DL_LIBS "-l${CMAKE_DL_LIBS}")
367    ENDIF(CMAKE_DL_LIBS MATCHES "^-l")
368ELSE(CMAKE_DL_LIBS)
369    SET(DL_LIBS "")
370ENDIF(CMAKE_DL_LIBS)
371
372IF(BUILD_STATIC_EXE)
373    SET(PROGRAM_LIB_SUFFIX "Static")
374ELSE(BUILD_STATIC_EXE)
375    SET(PROGRAM_LIB_SUFFIX "")
376ENDIF(BUILD_STATIC_EXE)
377
378IF(BUILD_TESTS)
379    ENABLE_TESTING()
380ENDIF(BUILD_TESTS)
381
382INCLUDE_DIRECTORIES(${OPENCL_INCLUDE_DIRS} ${PNG_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIR})
383
384LINK_DIRECTORIES("${OPENCL_LIBRARY_DIRS}")
385
386ADD_SUBDIRECTORY(CLRX)
387ADD_SUBDIRECTORY(utils)
388IF(HAVE_OPENCL AND NOT NO_CLWRAPPER)
389    ADD_SUBDIRECTORY(clwrapper)
390ENDIF(HAVE_OPENCL AND NOT NO_CLWRAPPER)
391ADD_SUBDIRECTORY(amdbin)
392ADD_SUBDIRECTORY(amdasm)
393IF(HAVE_OPENCL)
394    ADD_SUBDIRECTORY(clhelper)
395ENDIF(HAVE_OPENCL)
396IF (BUILD_TESTS)
397    ADD_SUBDIRECTORY(tests)
398ENDIF(BUILD_TESTS)
399
400ADD_SUBDIRECTORY(editors)
401ADD_SUBDIRECTORY(programs)
402IF (BUILD_SAMPLES AND HAVE_OPENCL)
403    ADD_SUBDIRECTORY(samples)
404ENDIF(BUILD_SAMPLES AND HAVE_OPENCL)
405
406ADD_SUBDIRECTORY(doc)
407
408ADD_SUBDIRECTORY(pkgconfig)
409
410SET(DOCINSTALLDIR share/doc/CLRX)
411INSTALL(FILES "${PROJECT_SOURCE_DIR}/AUTHORS" DESTINATION "${DOCINSTALLDIR}")
412INSTALL(FILES "${PROJECT_SOURCE_DIR}/CONTRIBUTORS" DESTINATION "${DOCINSTALLDIR}")
413INSTALL(FILES "${PROJECT_SOURCE_DIR}/COPYING" DESTINATION "${DOCINSTALLDIR}")
414INSTALL(FILES "${PROJECT_SOURCE_DIR}/ChangeLog" DESTINATION "${DOCINSTALLDIR}")
415INSTALL(FILES "${PROJECT_SOURCE_DIR}/COPYING.LIB" DESTINATION "${DOCINSTALLDIR}")
416INSTALL(FILES "${PROJECT_SOURCE_DIR}/COPYING.DOC" DESTINATION "${DOCINSTALLDIR}")
417INSTALL(FILES "${PROJECT_SOURCE_DIR}/INSTALL" DESTINATION "${DOCINSTALLDIR}")
418INSTALL(FILES "${PROJECT_SOURCE_DIR}/README" DESTINATION "${DOCINSTALLDIR}")
419INSTALL(FILES "${PROJECT_SOURCE_DIR}/README.md" DESTINATION "${DOCINSTALLDIR}")
Note: See TracBrowser for help on using the repository browser.