API: moved functions to files to make it easier to import to other projects
This commit is contained in:
+10
-11
@@ -4,22 +4,21 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
include_directories(include)
|
||||
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})
|
||||
|
||||
set(SOURCES
|
||||
src/main.c
|
||||
src/transformations.c
|
||||
src/utils.c
|
||||
src/filters.c
|
||||
src/imgio.c
|
||||
|
||||
)
|
||||
|
||||
find_library(TURBOJPEG_LIB NAMES turbojpeg REQUIRED)
|
||||
find_path(TURBOJPEG_INCLUDE NAMES turbojpeg.h REQUIRED)
|
||||
|
||||
add_executable(image_processor src/main.c)
|
||||
add_executable(image_processor ${SOURCES})
|
||||
|
||||
# 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})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user