From 00bd196197796177207a61f48895c2d048a63915 Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Wed, 13 Dec 2017 17:50:48 +0000 Subject: [PATCH] Adapting Cmake to new interface. --- CMakeLists.txt | 4 +++- exe/FaceLandmarkImg/CMakeLists.txt | 2 ++ exe/FaceLandmarkVid/CMakeLists.txt | 2 ++ exe/FaceLandmarkVidMulti/CMakeLists.txt | 2 ++ exe/FeatureExtraction/CMakeLists.txt | 2 ++ lib/local/Utilities/CMakeLists.txt | 31 +++++++++++++++++++++++++ 6 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 lib/local/Utilities/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 6927d73..385e1c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ find_package( BLAS REQUIRED ) include_directories( ${BLAS_INCLUDE_DIRS} ) LINK_DIRECTORIES(${BLAS_LIBRARY_DIRS}) -find_package( OpenCV REQUIRED ) +find_package( OpenCV 3.1 REQUIRED ) MESSAGE("OpenCV information:") MESSAGE(" OpenCV_INCLUDE_DIRS: ${OpenCV_INCLUDE_DIRS}") @@ -191,6 +191,8 @@ add_subdirectory(lib/local/LandmarkDetector) add_subdirectory(lib/local/FaceAnalyser) # Gaze library add_subdirectory(lib/local/GazeAnalyser) +# Utilities library +add_subdirectory(lib/local/Utilities) # executables add_subdirectory(exe/FaceLandmarkImg) add_subdirectory(exe/FaceLandmarkVid) diff --git a/exe/FaceLandmarkImg/CMakeLists.txt b/exe/FaceLandmarkImg/CMakeLists.txt index a2af8df..e986ef4 100644 --- a/exe/FaceLandmarkImg/CMakeLists.txt +++ b/exe/FaceLandmarkImg/CMakeLists.txt @@ -7,11 +7,13 @@ include_directories(${LandmarkDetector_SOURCE_DIR}/include) include_directories(../../lib/local/LandmarkDetector/include) include_directories(../../lib/local/FaceAnalyser/include) include_directories(../../lib/local/GazeAnalyser/include) +include_directories(../../lib/local/Utilities/include) add_executable(FaceLandmarkImg FaceLandmarkImg.cpp) target_link_libraries(FaceLandmarkImg LandmarkDetector) target_link_libraries(FaceLandmarkImg FaceAnalyser) target_link_libraries(FaceLandmarkImg GazeAnalyser) +target_link_libraries(FaceLandmarkImg Utilities) target_link_libraries(FaceLandmarkImg dlib) target_link_libraries(FaceLandmarkImg ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES}) diff --git a/exe/FaceLandmarkVid/CMakeLists.txt b/exe/FaceLandmarkVid/CMakeLists.txt index ad822c3..eece095 100644 --- a/exe/FaceLandmarkVid/CMakeLists.txt +++ b/exe/FaceLandmarkVid/CMakeLists.txt @@ -9,10 +9,12 @@ include_directories(${LandmarkDetector_SOURCE_DIR}/include) include_directories(../../lib/local/LandmarkDetector/include) include_directories(../../lib/local/FaceAnalyser/include) include_directories(../../lib/local/GazeAnalyser/include) +include_directories(../../lib/local/Utilities/include) target_link_libraries(FaceLandmarkVid LandmarkDetector) target_link_libraries(FaceLandmarkVid FaceAnalyser) target_link_libraries(FaceLandmarkVid GazeAnalyser) +target_link_libraries(FaceLandmarkVid Utilities) target_link_libraries(FaceLandmarkVid dlib) diff --git a/exe/FaceLandmarkVidMulti/CMakeLists.txt b/exe/FaceLandmarkVidMulti/CMakeLists.txt index 3e4086c..87b51c4 100644 --- a/exe/FaceLandmarkVidMulti/CMakeLists.txt +++ b/exe/FaceLandmarkVidMulti/CMakeLists.txt @@ -5,9 +5,11 @@ include_directories(${TBB_ROOT_DIR}/include) include_directories(${LandmarkDetector_SOURCE_DIR}/include) include_directories(../../lib/local/LandmarkDetector/include) +include_directories(../../lib/local/Utilities/include) add_executable(FaceLandmarkVidMulti FaceLandmarkVidMulti.cpp) target_link_libraries(FaceLandmarkVidMulti LandmarkDetector) +target_link_libraries(FaceLandmarkVidMulti Utilities) target_link_libraries(FaceLandmarkVidMulti dlib) target_link_libraries(FaceLandmarkVidMulti ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES}) diff --git a/exe/FeatureExtraction/CMakeLists.txt b/exe/FeatureExtraction/CMakeLists.txt index b3e1d18..39e379a 100644 --- a/exe/FeatureExtraction/CMakeLists.txt +++ b/exe/FeatureExtraction/CMakeLists.txt @@ -9,10 +9,12 @@ include_directories(${LandmarkDetector_SOURCE_DIR}/include) include_directories(../../lib/local/LandmarkDetector/include) include_directories(../../lib/local/FaceAnalyser/include) include_directories(../../lib/local/GazeAnalyser/include) +include_directories(../../lib/local/Utilities/include) target_link_libraries(FeatureExtraction LandmarkDetector) target_link_libraries(FeatureExtraction FaceAnalyser) target_link_libraries(FeatureExtraction GazeAnalyser) +target_link_libraries(FeatureExtraction Utilities) target_link_libraries(FeatureExtraction dlib) target_link_libraries(FeatureExtraction ${OpenCV_LIBS} ${Boost_LIBRARIES} ${TBB_LIBRARIES} ${BLAS_LIBRARIES}) diff --git a/lib/local/Utilities/CMakeLists.txt b/lib/local/Utilities/CMakeLists.txt new file mode 100644 index 0000000..73c39c0 --- /dev/null +++ b/lib/local/Utilities/CMakeLists.txt @@ -0,0 +1,31 @@ +include_directories(${BOOST_INCLUDE_DIR}) + +SET(SOURCE + src/ImageCapture.cpp + src/RecorderCSV.cpp + src/RecorderHOG.cpp + src/RecorderOpenFace.cpp + src/RecorderOpenFaceParameters.cpp + src/SequenceCapture.cpp + src/VisualizationUtils.cpp + src/Visualizer.cpp +) + +SET(HEADERS + include/ImageCapture.h + include/RecorderCSV.h + include/RecorderHOG.h + include/RecorderOpenFace.h + include/RecorderOpenFaceParameters.h + include/SequenceCapture.h + include/VisualizationUtils.h + include/Visualizer.h +) + +include_directories(./include) +include_directories(${UTILITIES_SOURCE_DIR}/include) + +add_library( Utilities ${SOURCE} ${HEADERS}) + +install (TARGETS Utilities DESTINATION lib) +install (FILES ${HEADERS} DESTINATION include/OpenFace)