Sha256: e254d7c0f93322892e1c521cd16f981cec450043ceb222250289939af9368295

Contents?: true

Size: 790 Bytes

Versions: 2

Compression:

Stored size: 790 Bytes

Contents

project(epeg)

cmake_minimum_required(VERSION 2.8)

set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

add_library(epeg STATIC epeg_main.c)

set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/dist)
file(MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX})

set(LIBJPEG_LIBRARY ${CMAKE_INSTALL_PREFIX}/lib/libjpeg.a)

include_directories(${CMAKE_INSTALL_PREFIX}/include)
target_link_libraries(epeg ${LIBJPEG_LIBRARY})

include(ExternalProject)
ExternalProject_Add(libjpeg
    SOURCE_DIR ${PROJECT_SOURCE_DIR}/vendor/libjpeg-turbo-2.0.4
    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_POSITION_INDEPENDENT_CODE=True)

add_dependencies(epeg libjpeg)

install(TARGETS epeg
    ARCHIVE DESTINATION lib
    COMPONENT libraries)

INSTALL(FILES Epeg.h
    DESTINATION include)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
epeg-1.0.1 epeg/CMakeLists.txt
epeg-1.0 epeg/CMakeLists.txt