Support compiling on Debian

This commit is contained in:
Epicalert 2021-07-10 19:04:18 +08:00
parent 31ce9a76f4
commit 4796a7177a
No known key found for this signature in database
GPG key ID: CAA46F858D0979BD
3 changed files with 18 additions and 1 deletions

View file

@ -12,6 +12,7 @@ endfunction()
cmake_minimum_required( VERSION 3.2 )
project( Facecam2D VERSION 0.2.0 )
set( CMAKE_CXX_STANDARD 17 )
set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake )
add_subdirectory( "libs/Boxer" )
find_package( libzip REQUIRED )
@ -68,7 +69,7 @@ add_executable( fc2d
src/configfile.cpp
)
target_link_libraries( fc2d ${OpenCV_LIBS} ${OPENGL_LIBRARIES} ${WEBP_LIBRARIES}
FreeGLUT::freeglut GLEW::glew zip Boxer fmt )
${GLUT_LIBRARY} ${GLEW_LIBRARIES} zip Boxer fmt )
add_executable( fc2dconfig
src/fc2dconfig.cpp
src/paths.cpp

8
cmake/FindFreeGLUT.cmake Normal file
View file

@ -0,0 +1,8 @@
find_path( GLUT_INCLUDE_DIR NAMES zip.h )
find_library( GLUT_LIBRARY NAMES glut PATHS /usr/lib /usr/lib64 /lib /lib64 /usr/local/lib )
if (GLUT_INCLUDE_DIR AND GLUT_LIBRARY)
set( GLUT_FOUND "TRUE" )
message( STATUS "Found FreeGLUT: ${GLUT_LIBRARY}" )
endif (GLUT_INCLUDE_DIR AND GLUT_LIBRARY)

8
cmake/Findlibzip.cmake Normal file
View file

@ -0,0 +1,8 @@
find_path( LIBZIP_INCLUDE_DIR NAMES zip.h )
find_library( LIBZIP_LIBRARY NAMES zip PATHS /usr/lib /usr/lib64 /lib /lib64 /usr/local/lib )
if (LIBZIP_INCLUDE_DIR AND LIBZIP_LIBRARY)
set( LIBZIP_FOUND "TRUE" )
message( STATUS "Found libzip: ${LIBZIP_LIBRARY}" )
endif (LIBZIP_INCLUDE_DIR AND LIBZIP_LIBRARY)