aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarat Dukhan <maratek@gmail.com>2017-10-26 00:55:45 +0000
committerMarat Dukhan <maratek@gmail.com>2017-10-26 00:55:45 +0000
commit4ac61b112252778b174575931c641bef661ab3cd (patch)
tree3ba165da6b1e9837c0948be7307d4aa37cb77cf0
parent094033ef2bcbe6e17540c2e5b9e968ba3d8bdb09 (diff)
downloadpsimd-4ac61b112252778b174575931c641bef661ab3cd.tar.gz
Support CMake 2.8.12
-rw-r--r--CMakeLists.txt11
1 files changed, 8 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 87505cb..eb66db0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -3,10 +3,15 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR)
INCLUDE(GNUInstallDirs)
# ---[ Project
-PROJECT(psimd NONE)
+PROJECT(psimd C)
-# ---[ psimd library
-ADD_LIBRARY(psimd INTERFACE)
+# ---[ psimd librar
+IF(${CMAKE_VERSION} VERSION_LESS "3.0")
+ ADD_LIBRARY(psimd STATIC include/psimd.h)
+ SET_TARGET_PROPERTIES(psimd PROPERTIES LINKER_LANGUAGE C)
+ELSE()
+ ADD_LIBRARY(psimd INTERFACE)
+ENDIF()
TARGET_INCLUDE_DIRECTORIES(psimd INTERFACE include)
INSTALL(FILES include/psimd.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})