forked from OpenCLWrangler/clew
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
31 lines (22 loc) · 862 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
project(clew)
cmake_minimum_required (VERSION 2.6)
if (NOT CMAKE_VERSION VERSION_LESS 2.8.4)
cmake_policy (SET CMP0017 NEW)
endif()
include(CMakeParseArguments)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
message(STATUS "Project source dir = ${PROJECT_SOURCE_DIR}")
message(STATUS "Project build dir = ${CMAKE_BINARY_DIR}")
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
endif()
include_directories(include)
add_library(clew src/clew.c include/clew.h)
add_executable(testclew clewTest/clewTest.cpp include/clew.h)
target_link_libraries(testclew clew ${CMAKE_DL_LIBS})
install(TARGETS clew
LIBRARY DESTINATION lib COMPONENT libraries
ARCHIVE DESTINATION lib/static COMPONENT libraries)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/include/clew.h
DESTINATION include/CL)