Permalink
Browse files

Downgrade CMake requirement from 3.0 to 2.8.12

Older distributions that might still be floating around (Ubuntu
14.04, CentOS 6.8) are stuck at 2.8.12. And they can still compile
trax just fine...
  • Loading branch information...
rokm committed Jun 15, 2017
1 parent fe711f2 commit c31fee5353d98f3e3bf07d23f003d838fedbac5b
View
@@ -1,6 +1,6 @@
PROJECT (trax)
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
GET_FILENAME_COMPONENT(PROJECT_ROOT . ABSOLUTE)
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
INCLUDE(GNUInstallDirs)
@@ -30,7 +30,7 @@
# either expressed or implied, of the FreeBSD Project.
PROJECT(sample_client)
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
ADD_EXECUTABLE(sample_client client.cpp)
@@ -30,7 +30,7 @@
# either expressed or implied, of the FreeBSD Project.
PROJECT(ncc_example)
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
FIND_PACKAGE(OpenCV REQUIRED COMPONENTS core imgproc highgui)
View
@@ -1,10 +1,10 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/..)
ADD_EXECUTABLE(test_core test.c)
TARGET_LINK_LIBRARIES(test_core trax)
ADD_EXECUTABLE(test_cpp test.cpp debugging.c)
TARGET_LINK_LIBRARIES(test_cpp trax dl)
TARGET_LINK_LIBRARIES(test_cpp trax dl)
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
ADD_LIBRARY(trax_client SHARED client.cpp process.cpp threads.cpp timer.cpp)
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
FIND_PROGRAM(MKOCTFILE mkoctfile)
@@ -7,23 +7,23 @@ IF (MKOCTFILE)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/traxserver.mex COMMAND ${MKOCTFILE}
-mex -I${CMAKE_SOURCE_DIR}/include/ ${CMAKE_CURRENT_SOURCE_DIR}/traxserver.cpp ${CMAKE_CURRENT_SOURCE_DIR}/helpers.cpp
-ltraxstatic -DOCTAVE -L${CMAKE_RUNTIME_OUTPUT_DIRECTORY} MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/traxserver.cpp
DEPENDS
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/helpers.cpp
traxstatic
traxstatic
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMENT "Building traxserver.mex")
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/traxclient.mex COMMAND ${MKOCTFILE}
-mex -I${CMAKE_SOURCE_DIR}/include/ -I${CMAKE_SOURCE_DIR}/support/client/include/
${CMAKE_CURRENT_SOURCE_DIR}/traxclient.cpp ${CMAKE_CURRENT_SOURCE_DIR}/helpers.cpp
-ltraxstatic -ltrax_client_static -DOCTAVE -L${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
-ltraxstatic -ltrax_client_static -DOCTAVE -L${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
-L${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/support/client
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/traxclient.cpp
DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/helpers.cpp
traxstatic
traxstatic
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} COMMENT "Building traxclient.mex")
ADD_CUSTOM_TARGET(traxoctave ALL DEPENDS
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/traxserver.mex
ADD_CUSTOM_TARGET(traxoctave ALL DEPENDS
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/traxserver.mex
${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/traxclient.mex)
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/DESCRIPTION.in" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/DESCRIPTION")
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
FIND_PACKAGE(OpenCV REQUIRED)
INCLUDE_DIRECTORIES(AFTER ${OpenCV_INCLUDE_DIR})
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
FIND_PROGRAM(OCTAVE octave)
@@ -13,4 +13,4 @@ set_tests_properties(test_nonexisting_tracker PROPERTIES TIMEOUT 10 WILL_FAIL TR
IF (OCTAVE)
ADD_TEST(NAME test_octave_nonexisting COMMAND traxtest -d -t 3 -- ${OCTAVE} --no-window-system --no-gui --path ${CMAKE_CURRENT_SOURCE_DIR} --eval "idonotexist" WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set_tests_properties(test_octave_nonexisting PROPERTIES TIMEOUT 5 WILL_FAIL TRUE)
ENDIF()
ENDIF()
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
ADD_EXECUTABLE(badtracker badtracker.cpp)
TARGET_LINK_LIBRARIES(badtracker traxstatic)
@@ -1,5 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../../../src)
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12)
ADD_EXECUTABLE(native_static native_static.c)
TARGET_LINK_LIBRARIES(native_static traxstatic)
@@ -27,4 +27,4 @@ ENDIF()
IF (OCTAVE)
ADD_TEST(NAME test_octave_static_timeout COMMAND traxtest -d -t 3 -p time_wait=5 -- ${OCTAVE} --no-window-system --no-gui --path ${CMAKE_CURRENT_SOURCE_DIR} --eval "matlab_static" WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set_tests_properties(test_octave_static_timeout PROPERTIES TIMEOUT 10 WILL_FAIL TRUE)
ENDIF()
ENDIF()

0 comments on commit c31fee5

Please sign in to comment.