fix creation of C++ sample

add library config

Signed-off-by: Samuel Herman <sherman8915@gmail.com>
This commit is contained in:
Samuel Herman
2024-11-21 09:00:11 -08:00
parent 337990aa3a
commit 758a0e69b9
3 changed files with 36 additions and 8 deletions

View File

@@ -0,0 +1,25 @@
# ===================================================================================
# The InspireFace CMake configuration file
#
# ** File generated automatically, do not modify **
# Usage from an external project:
# In your CMakeLists.txt, add these lines:
#
# find_package(InspireFace REQUIRED)
# include_directories(${InspireFace_INCLUDE_DIRS}) # Not needed for CMake >= 2.8.11
# target_link_libraries(MY_TARGET_NAME ${InspireFace_LIBS})
#
#
#
# This file will define the following variables:
# - InspireFace_LIBS : The list of all imported targets for InspireFace modules.
# - InspireFace_INCLUDE_DIRS : The InspireFace include directories.
#
#
@PACKAGE_INIT@
set(InspireFace_LIBS "")
file(GLOB LIBS "@CMAKE_BINARY_DIR@/InspireFace/lib/*.*")
list(APPEND InspireFace_LIBS ${LIBS})
set(InspireFace_INCLUDE_DIRS "@CMAKE_BINARY_DIR@/InspireFace/include")

View File

@@ -39,13 +39,13 @@ set_target_properties(MTFaceTrackSample PROPERTIES
)
if(NOT DISABLE_GUI)
# Examples of face detection and tracking
add_executable(FaceTrackVideoSample cpp/sample_face_track_video.cpp)
target_link_libraries(FaceTrackVideoSample InspireFace ${ext})
set_target_properties(FaceTrackVideoSample PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/sample/"
)
endif()
# Examples of face detection and tracking
add_executable(FaceTrackVideoSample cpp/sample_face_track_video.cpp)
target_link_libraries(FaceTrackVideoSample InspireFace ${ext})
set_target_properties(FaceTrackVideoSample PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/sample/"
)
endif ()
@@ -265,4 +265,4 @@ install(TARGETS MTFaceTrackSample RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/sa
install(TARGETS FaceRecognitionSample RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/sample)
install(TARGETS FaceSearchSample RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/sample)
install(TARGETS FaceComparisonSample RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/sample)
install(TARGETS FaceTrackVideoSample RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/sample)