Skip to content

Instantly share code, notes, and snippets.

@LaurentGomila
Created February 18, 2013 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LaurentGomila/d7db6596d536022f91d6 to your computer and use it in GitHub Desktop.
Save LaurentGomila/d7db6596d536022f91d6 to your computer and use it in GitHub Desktop.
Quick and dirty CMake file for JPEG 8c (used on Windows - probably not portable)
set(CMAKE_C_OUTPUT_EXTENSION .o)
cmake_minimum_required(VERSION 2.8)
# set a default build type if none was provided
# this has to be done before the project() instruction!
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
endif()
# project name
project(jpeg)
# add an option for choosing the build type (shared or static)
set(BUILD_SHARED_LIBS TRUE CACHE BOOL "TRUE to build jpeg as shared libraries, FALSE to build it as static libraries")
# source files
set(SRC
jcapimin.c
jcapistd.c
jdapimin.c
jdapistd.c
jcomapi.c
jcparam.c
jctrans.c
jdtrans.c
jcinit.c
jcmaster.c
jcmainct.c
jcprepct.c
jccoefct.c
jccolor.c
jcsample.c
jcdctmgr.c
jfdctint.c
jfdctfst.c
jfdctflt.c
jchuff.c
jcarith.c
jcmarker.c
jdatadst.c
jdmaster.c
jdinput.c
jdmainct.c
jdcoefct.c
jdpostct.c
jdmarker.c
jdhuff.c
jdarith.c
jddctmgr.c
jidctint.c
jidctfst.c
jidctflt.c
jdsample.c
jdcolor.c
jdmerge.c
jquant1.c
jquant2.c
jdatasrc.c
jaricom.c
jerror.c
jmemmgr.c
jutils.c
jmemnobs.c
)
# define the target
add_library(jpeg ${SRC})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment