summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-12-02 10:36:11 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-12-02 10:36:11 +0100
commit7098be23b924d1b96143aaaf42f7bc02cb60fe19 (patch)
tree9074e4bb746a42c495aaa700cd7151c4416356c1 /CMakeLists.txt
parent57f2f8976b37ba6f6ec188c77e38cd854d594233 (diff)
downloadufodecode-7098be23b924d1b96143aaaf42f7bc02cb60fe19.tar.gz
ufodecode-7098be23b924d1b96143aaaf42f7bc02cb60fe19.tar.bz2
ufodecode-7098be23b924d1b96143aaaf42f7bc02cb60fe19.tar.xz
ufodecode-7098be23b924d1b96143aaaf42f7bc02cb60fe19.zip
Add documentation and split CMakeLists
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt66
1 files changed, 3 insertions, 63 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c7c2fc..8ae2e1c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,72 +27,12 @@ if(NOT DEFINED LOCALE_INSTALL_DIR)
set(LOCALE_INSTALL_DIR "${DATA_INSTALL_DIR}/locale/")
endif(NOT DEFINED LOCALE_INSTALL_DIR)
-
-# --- Look for SSE support --------------------------------------------------
-include(CheckCXXSourceRuns)
-set(SSE_FLAGS)
-if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_REQUIRED_FLAGS "-msse")
- check_cxx_source_runs("
- #include <xmmintrin.h>
- int main()
- {
- __m128 a, b;
- float vals[4] = {0};
- a = _mm_loadu_ps(vals);
- b = a;
- b = _mm_add_ps(a,b);
- _mm_storeu_ps(vals,b);
- return 0;
- }"
- SSE_AVAILABLE)
-
- set(CMAKE_REQUIRED_FLAGS)
-
- if (SSE_AVAILABLE)
- option(HAVE_SSE "Use SSE extensions" ON)
- set(SSE_FLAGS "-msse")
- endif()
-endif()
-
-# --- Build library and install ---------------------------------------------
-include_directories(
- ${CMAKE_SOURCE_DIR}/src
- ${CMAKE_CURRENT_BINARY_DIR}
-)
-
-add_definitions("--std=c99 -Wall -O2 ${SSE_FLAGS}")
-
-add_library(ufodecode SHARED src/ufodecode.c)
-
-set_target_properties(ufodecode PROPERTIES
- VERSION ${LIBUFODECODE_ABI_VERSION}
- SOVERSION ${LIBUFODECODE_ABI_MAJOR_VERSION}
-)
-
-install(TARGETS ufodecode
- LIBRARY DESTINATION lib${LIB_SUFFIX}
-)
-
-install(FILES
- src/ufodecode.h
- DESTINATION include
-)
-
configure_file(ufodecode.pc.in ${CMAKE_CURRENT_BINARY_DIR}/ufodecode.pc)
-
-if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
- set(DEBUG "1")
-endif()
-configure_file(src/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
-
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/ufodecode.pc
DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
+add_subdirectory(src)
+add_subdirectory(doc)
+add_subdirectory(test)
-# --- Build test executable -------------------------------------------------
-add_executable(ipedec test/ipedec.c)
-target_link_libraries(ipedec ufodecode)
-
-install(TARGETS ipedec DESTINATION ${BIN_INSTALL_DIR})