2021-11-27 03:27:39 +00:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
2021-11-11 11:04:59 +00:00
|
|
|
project(EN605.617.81.FA21_StephenSeo_DitheringProject)
|
|
|
|
|
|
|
|
set(Project_SOURCES
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/main.cc
|
2021-12-01 08:31:51 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/arg_parse.cc
|
2021-11-11 13:15:51 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/image.cc
|
2021-11-29 10:24:50 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/video.cc
|
2021-11-15 05:40:11 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/src/opencl_handle.cc
|
2021-11-11 11:04:59 +00:00
|
|
|
)
|
|
|
|
|
2021-11-15 05:40:11 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wpedantic")
|
2021-11-11 11:04:59 +00:00
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG")
|
|
|
|
|
|
|
|
if(NOT DEFINED CMAKE_BUILD_TYPE OR NOT CMAKE_BUILD_TYPE)
|
|
|
|
message(WARNING "CMAKE_BUILD_TYPE not specified, setting to Debug...")
|
|
|
|
set(CMAKE_BUILD_TYPE "Debug")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_executable(DitheringProject
|
|
|
|
${Project_SOURCES})
|
2021-11-15 05:40:11 +00:00
|
|
|
#target_compile_features(DitheringProject PUBLIC cxx_std_11)
|
2021-11-11 13:15:51 +00:00
|
|
|
|
2021-11-16 08:14:13 +00:00
|
|
|
find_package(OpenCL REQUIRED)
|
|
|
|
|
2021-11-11 13:15:51 +00:00
|
|
|
find_package(PNG REQUIRED)
|
|
|
|
|
2021-11-29 10:13:26 +00:00
|
|
|
find_package(PkgConfig REQUIRED)
|
2021-11-30 07:02:51 +00:00
|
|
|
pkg_check_modules(FFMPEG_LIBAVCODEC REQUIRED
|
|
|
|
libavcodec libavformat libavutil libswscale)
|
2021-11-29 10:13:26 +00:00
|
|
|
|
2021-11-11 13:15:51 +00:00
|
|
|
target_include_directories(DitheringProject PUBLIC
|
2021-11-16 08:14:13 +00:00
|
|
|
${OpenCL_INCLUDE_DIRS}
|
2021-11-11 13:15:51 +00:00
|
|
|
${PNG_INCLUDE_DIRS}
|
2021-11-29 10:13:26 +00:00
|
|
|
${FFMPEG_LIBAVCODEC_INCLUDE_DIRS}
|
2021-11-11 13:15:51 +00:00
|
|
|
)
|
|
|
|
target_link_libraries(DitheringProject PUBLIC
|
2021-11-16 08:14:13 +00:00
|
|
|
${OpenCL_LIBRARIES}
|
2021-11-11 13:15:51 +00:00
|
|
|
${PNG_LIBRARIES}
|
2021-11-29 10:13:26 +00:00
|
|
|
${FFMPEG_LIBAVCODEC_LINK_LIBRARIES}
|
2021-11-11 13:15:51 +00:00
|
|
|
)
|