-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
474 additions
and
1,323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
cmake_minimum_required(VERSION 3.0) | ||
|
||
cmake_policy(SET CMP0011 NEW) | ||
cmake_policy(SET CMP0025 NEW) | ||
|
||
# Avoid source tree pollution | ||
set(CMAKE_DISABLE_SOURCE_CHANGES ON) | ||
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON) | ||
|
||
If(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) | ||
message(FATAL_ERROR "In-source builds are not permitted. Make a separate folder for building:\nmkdir build; cd build; cmake ..\nBefore that, remove the files already created:\nrm -rf CMakeCache.txt CMakeFiles") | ||
endif(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) | ||
|
||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") | ||
|
||
include(GNUInstallDirs) | ||
|
||
project(rawspeed CXX) | ||
|
||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
option(USE_XMLLINT "Run xmllint to test if data/cameras.xml is valid" ON) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") | ||
|
||
add_subdirectory(RawSpeed) | ||
add_subdirectory(data) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
find_package(Pugixml 1.2 REQUIRED) | ||
include_directories(SYSTEM ${Pugixml_INCLUDE_DIRS}) | ||
|
||
find_package(JPEG REQUIRED) | ||
include_directories(SYSTEM ${JPEG_INCLUDE_DIRS}) | ||
|
||
FILE(GLOB RAWSPEED_SOURCES | ||
"AriDecoder.cpp" | ||
"ArwDecoder.cpp" | ||
"BitPumpJPEG.cpp" | ||
"BitPumpMSB.cpp" | ||
"BitPumpMSB16.cpp" | ||
"BitPumpMSB32.cpp" | ||
"BitPumpPlain.cpp" | ||
"BlackArea.cpp" | ||
"ByteStream.cpp" | ||
"ByteStreamSwap.cpp" | ||
"Camera.cpp" | ||
"CameraMetaData.cpp" | ||
"CameraMetadataException.cpp" | ||
"CameraSensorInfo.cpp" | ||
"CiffEntry.cpp" | ||
"CiffIFD.cpp" | ||
"CiffParser.cpp" | ||
"CiffParserException.cpp" | ||
"ColorFilterArray.cpp" | ||
"Common.cpp" | ||
"Cr2Decoder.cpp" | ||
"CrwDecoder.cpp" | ||
"DcrDecoder.cpp" | ||
"DcsDecoder.cpp" | ||
"DngDecoder.cpp" | ||
"DngDecoderSlices.cpp" | ||
"DngOpcodes.cpp" | ||
"ErfDecoder.cpp" | ||
"FileIOException.cpp" | ||
"FileMap.cpp" | ||
"FileReader.cpp" | ||
"FileWriter.cpp" | ||
"HasselbladDecompressor.cpp" | ||
"IOException.cpp" | ||
"KdcDecoder.cpp" | ||
"LJpegDecompressor.cpp" | ||
"LJpegPlain.cpp" | ||
"MefDecoder.cpp" | ||
"MosDecoder.cpp" | ||
"MrwDecoder.cpp" | ||
"NakedDecoder.cpp" | ||
"NefDecoder.cpp" | ||
"NikonDecompressor.cpp" | ||
"OrfDecoder.cpp" | ||
"PefDecoder.cpp" | ||
"PentaxDecompressor.cpp" | ||
"RafDecoder.cpp" | ||
"RawDecoder.cpp" | ||
"RawDecoderException.cpp" | ||
"RawImage.cpp" | ||
"RawImageDataFloat.cpp" | ||
"RawImageDataU16.cpp" | ||
"RawParser.cpp" | ||
"Rw2Decoder.cpp" | ||
"SrwDecoder.cpp" | ||
"StdAfx.cpp" | ||
"ThreefrDecoder.cpp" | ||
"TiffEntry.cpp" | ||
"TiffEntryBE.cpp" | ||
"TiffIFD.cpp" | ||
"TiffIFDBE.cpp" | ||
"TiffParser.cpp" | ||
"TiffParserException.cpp" | ||
"X3fDecoder.cpp" | ||
"X3fParser.cpp" | ||
) | ||
|
||
# | ||
# build librawspeed | ||
# | ||
if(WIN32) | ||
set(RAWSPEED_LIBS "msvcrt") | ||
endif(WIN32) | ||
|
||
add_library(rawspeed STATIC ${RAWSPEED_SOURCES}) | ||
|
||
set_target_properties(rawspeed | ||
PROPERTIES | ||
POSITION_INDEPENDENT_CODE True | ||
) | ||
|
||
target_link_libraries(rawspeed ${RAWSPEED_LIBS} ${Pugixml_LIBRARIES} ${JPEG_LIBRARIES}) | ||
|
||
# | ||
# the rawspeed part is a bit of a hack: | ||
# the static linking didn't work since it was pulling -lstdc++ and -lm into linker flags. | ||
# so we do a custom dependency and pretend an imported librawsped.a so no other -l are | ||
# appended. | ||
# | ||
add_library(rawspeed_static STATIC IMPORTED GLOBAL) | ||
set_target_properties(rawspeed_static | ||
PROPERTIES | ||
IMPORTED_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/librawspeed.a | ||
INTERFACE_LINK_LIBRARIES $<TARGET_PROPERTY:rawspeed,INTERFACE_LINK_LIBRARIES> | ||
POSITION_INDEPENDENT_CODE True | ||
) | ||
|
||
add_dependencies(rawspeed_static rawspeed) |
Oops, something went wrong.