added working jpeg
This commit is contained in:
+17
-5
@@ -3,11 +3,23 @@ set(CMAKE_C_STANDARD 23)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
include_directories(include)
|
||||
project(ppm_image_processor LANGUAGES C)
|
||||
find_package(JPEG REQUIRED)
|
||||
project(image_processor LANGUAGES C)
|
||||
# find_package(JPEG REQUIRED)
|
||||
#
|
||||
# add_executable(image_processor src/main.c)
|
||||
#
|
||||
# target_include_directories(image_processor PRIVATE ${JPEG_INCLUDE_DIRS})
|
||||
#
|
||||
# target_link_libraries(image_processor PRIVATE ${JPEG_LIBRARIES})
|
||||
|
||||
add_executable(ppm_image_processor src/main.c)
|
||||
find_library(TURBOJPEG_LIB NAMES turbojpeg REQUIRED)
|
||||
find_path(TURBOJPEG_INCLUDE NAMES turbojpeg.h REQUIRED)
|
||||
|
||||
target_include_directories(ppm_image_processor PRIVATE ${JPEG_INCLUDE_DIRS})
|
||||
add_executable(image_processor src/main.c)
|
||||
|
||||
# 2. Include the directories for the header files
|
||||
target_include_directories(image_processor PRIVATE ${TURBOJPEG_INCLUDE})
|
||||
|
||||
# 3. Link the actual turbojpeg library
|
||||
target_link_libraries(image_processor PRIVATE ${TURBOJPEG_LIB})
|
||||
|
||||
target_link_libraries(ppm_image_processor PRIVATE ${JPEG_LIBRARIES})
|
||||
|
||||
Reference in New Issue
Block a user