source: CLRX/CLRadeonExtender/trunk/CMakeLists.txt @ 3890

Last change on this file since 3890 was 3890, checked in by matszpk, 16 months ago

CLRadeonExtender: Revert previous changes.

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