diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ecbfdd..27fb949 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,17 @@ cmake_minimum_required(VERSION 2.6) project(libresample) include(CheckIncludeFiles) +include(CheckTypeSize) + +check_type_size("void *" POINTER_SIZE) + +if(${POINTER_SIZE} EQUAL 8) + set(LIBDIR lib64) +elseif(${POINTER_SIZE} EQUAL 4) + set(LIBDIR lib) +else(${POINTER_SIZE} EQUAL 8) + message(FATAL_ERROR "pointer size is not 4 bytes or 8 bytes") +endif(${POINTER_SIZE} EQUAL 8) check_include_files(inttypes.h HAVE_INTTYPES_H) @@ -10,5 +21,5 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/configtemplate.h ${CMAKE_CURRENT_ add_library(resample SHARED src/filterkit.c src/resample.c src/resamplesubs.c) set_target_properties(resample PROPERTIES VERSION 1.0 SOVERSION 1) -install(TARGETS resample LIBRARY DESTINATION ${LIB_INSTALL_DIR}) -install(FILES include/libresample.h DESTINATION ${INCLUDE_INSTALL_DIR}) +install(TARGETS resample LIBRARY DESTINATION ${LIBDIR}) +install(FILES include/libresample.h DESTINATION include) |