-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
31 lines (21 loc) · 1.18 KB
/
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
cmake_minimum_required (VERSION 2.6)
project (libhilbert)
set(DIDIR "${PROJECT_SOURCE_DIR}/src")
set(CMAKE_BUILD_TYPE Release)
set(_DEFAULT_INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include")
set(_DEFAULT_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib")
if (EXISTS "${CMAKE_INSTALL_PREFIX}/lib32/" AND CMAKE_SIZEOF_VOID_P EQUAL 4)
set(_DEFAULT_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib32")
elif (EXISTS "${CMAKE_INSTALL_PREFIX}/lib64/" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
set(_DEFAULT_LIBRARY_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib64")
endif()
set(LIBRARY_INSTALL_DIR "${_DEFAULT_LIBRARY_INSTALL_DIR}" CACHE PATH "Install directory for library files")
set(INCLUDE_INSTALL_DIR "${_DEFAULT_INCLUDE_INSTALL_DIR}" CACHE PATH "Install directory for header files")
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
include_directories ("${PROJECT_SOURCE_DIR}/src")
add_definitions(-std=c99)
file(GLOB FILES_SRC "${DIDIR}/*.h" "${DIDIR}/binaryOps.c" "${DIDIR}/hilbertKey.c")
file(GLOB HEADERS "${DIDIR}/hilbertKey.h")
add_library (libhilbert ${FILES_SRC})
INSTALL(TARGETS libhilbert DESTINATION "${_DEFAULT_LIBRARY_INSTALL_DIR}")
INSTALL(FILES ${HEADERS} DESTINATION "${_DEFAULT_INCLUDE_INSTALL_DIR}")