change CMakeList.txt for compile on Linux, remove stb_image.c
This commit is contained in:
parent
d24c80d908
commit
dfb1c6412d
@ -9,18 +9,35 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
IF(UNIX)
|
||||
MESSAGE(STATUS "UNIX")
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(LIBAV REQUIRED IMPORTED_TARGET
|
||||
libavdevice
|
||||
libavfilter
|
||||
libavformat
|
||||
libswresample
|
||||
libswscale
|
||||
libavutil
|
||||
)
|
||||
add_executable(${PROJECT_N} main.cpp)
|
||||
#opencv
|
||||
find_package(OpenCV REQUIRED)
|
||||
include_directories(${OpenCV_INCLUDE_DIRS})
|
||||
include_directories(/usr/include/opencv4)
|
||||
|
||||
#glfw
|
||||
#opengl
|
||||
#glm
|
||||
#link
|
||||
|
||||
|
||||
#glad
|
||||
include_directories(${PROJECT_SOURCE_DIR}/third/glad/include)
|
||||
set(GLAD_SRC ${PROJECT_SOURCE_DIR}/third/glad/src/glad.c)
|
||||
|
||||
#srcs
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||
file(GLOB_RECURSE PROJECT_SRCS ${PROJECT_SOURCE_DIR}/src/*.cpp)
|
||||
|
||||
add_executable(${PROJECT_N}
|
||||
${PROJECT_SRCS}
|
||||
${GLAD_SRC}
|
||||
main.cpp)
|
||||
target_link_libraries(${PROJECT_N}
|
||||
PkgConfig::LIBAV
|
||||
glfw
|
||||
OpenGL
|
||||
/usr/lib/libopencv_core.so
|
||||
/usr/lib/libopencv_imgcodecs.so
|
||||
#${OpenCV_LIBS}
|
||||
)
|
||||
ELSE(WIN32)
|
||||
MESSAGE(STATUS "WIN32")
|
||||
@ -35,11 +52,6 @@ ELSE(WIN32)
|
||||
#glad
|
||||
include_directories(${THIRD_LIB_DIR}/glad/glad3.3/include)
|
||||
set(GLAD_SRCS ${THIRD_LIB_DIR}/glad/glad3.3/src/glad.c
|
||||
src/stb_image.cpp
|
||||
src/shaderService.cpp
|
||||
src/triangle.cpp
|
||||
src/texture.cpp
|
||||
src/matrix.cpp
|
||||
)
|
||||
#glfw
|
||||
include_directories(${THIRD_LIB_DIR}/glfw/glfw-3.3.8.bin.WIN64/glfw-3.3.8.bin.WIN64/include)
|
||||
@ -66,4 +78,4 @@ ELSE(WIN32)
|
||||
${Opengl_LIBS}
|
||||
${OpenCV_LIBS}
|
||||
)
|
||||
endif ()
|
||||
ENDIF ()
|
||||
|
@ -1,5 +0,0 @@
|
||||
//
|
||||
// Created by jie on 2023/10/12.
|
||||
//
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include "stb_image.h"
|
Loading…
Reference in New Issue
Block a user