blue_noise_generation/CMakeLists.txt

34 lines
1 KiB
Text
Raw Normal View History

cmake_minimum_required(VERSION 3.9)
project(Dithering)
set(Dithering_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/src/blue_noise.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/image.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/arg_parse.cpp
)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g")
if(NOT DEFINED CMAKE_BUILD_TYPE OR NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
message("Set build type to Debug by default")
endif()
find_package(Threads REQUIRED)
find_package(OpenCL REQUIRED)
2021-11-08 11:04:58 +00:00
find_package(PNG REQUIRED)
add_executable(Dithering ${Dithering_SOURCES})
target_compile_features(Dithering PUBLIC cxx_std_17)
target_include_directories(Dithering PUBLIC
Threads::Threads
2021-11-08 11:04:58 +00:00
${OpenCL_INCLUDE_DIRS}
${PNG_INCLUDE_DIRS})
target_link_libraries(Dithering PUBLIC
Threads::Threads
2021-11-08 11:04:58 +00:00
${OpenCL_LIBRARIES}
${PNG_LIBRARIES})