diff options
author | Marat Dukhan <maratek@gmail.com> | 2017-10-26 00:50:43 +0000 |
---|---|---|
committer | Marat Dukhan <maratek@gmail.com> | 2017-10-26 00:50:43 +0000 |
commit | 381f2fb9ae1b07f145aaa359a179fc336ee45372 (patch) | |
tree | 333f8fc6a49e261762d82abd0cb8087a1aa35f9a | |
parent | 68818b5ec1732efc4517fe34a58499228868a55e (diff) | |
download | FXdiv-381f2fb9ae1b07f145aaa359a179fc336ee45372.tar.gz |
CMake 2.8.12 compatibility
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 804d9a0..c3ac1cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR) INCLUDE(GNUInstallDirs) # ---[ Project -PROJECT(FXdiv LANGUAGES CXX) +PROJECT(FXdiv C CXX) # ---[ Options. OPTION(FXDIV_BUILD_TESTS "Build FXdiv unit tests" ON) @@ -42,7 +42,12 @@ IF(NOT TARGET benchmark) ENDIF() # ---[ FXdiv library -ADD_LIBRARY(fxdiv INTERFACE) +IF(${CMAKE_VERSION} VERSION_LESS "3.0") + ADD_LIBRARY(fxdiv STATIC include/fxdiv.h) + SET_TARGET_PROPERTIES(fxdiv PROPERTIES LINKER_LANGUAGE C) +ELSE() + ADD_LIBRARY(fxdiv INTERFACE) +ENDIF() TARGET_INCLUDE_DIRECTORIES(fxdiv INTERFACE include) INSTALL(FILES include/fxdiv.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) |