From: Miquel G. <gbm...@gm...> - 2010-11-04 23:12:55
|
Change to CMake build system to allow easier handling of additional command line utilities. --- CMakeLists.txt | 47 +++++++++++++++++++++++++++++++++++++++++++++++ liborigin2.pro | 34 ---------------------------------- 2 files changed, 47 insertions(+), 34 deletions(-) create mode 100644 CMakeLists.txt delete mode 100644 liborigin2.pro diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..c321500 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,47 @@ +# CMakeLists.txt for liborigin2 +cmake_minimum_required(VERSION 2.8) + +# boost library headers +find_package(Boost REQUIRED) +include_directories(${Boost_INCLUDE_DIRS}) + +# source files +set (sources + OriginFile.cpp + OriginParser.cpp + OriginDefaultParser.cpp + Origin600Parser.cpp + Origin610Parser.cpp + Origin700Parser.cpp + Origin750Parser.cpp + Origin800Parser.cpp + Origin810Parser.cpp + ) + +# header files for development +set (devel-headers + OriginObj.h + OriginFile.h + OriginParser.h + tree.hh + ) + +# dynamic library +add_library (origin2 SHARED ${sources}) +set_target_properties(origin2 PROPERTIES VERSION 0.0.1 SOVERSION 0 ) + +# static library +add_library (origin2-static STATIC ${sources}) +set_target_properties(origin2-static PROPERTIES OUTPUT_NAME "origin2") + +# install libraries +install(TARGETS origin2 origin2-static DESTINATION lib) + +# install headers +install(FILES ${devel-headers} DESTINATION include) + +# command line util +add_executable(opj2dat opj2dat.cpp) +target_link_libraries (opj2dat origin2-static) + +install(TARGETS opj2dat DESTINATION bin) diff --git a/liborigin2.pro b/liborigin2.pro deleted file mode 100644 index 50f4006..0000000 --- a/liborigin2.pro +++ /dev/null @@ -1,34 +0,0 @@ -TARGET = origin2 -TEMPLATE = lib -CONFIG += warn_on release thread -#CONFIG += staticlib -MOC_DIR = ./tmp -OBJECTS_DIR = ./tmp - -DESTDIR = ./ - -# Path to the folder where the header files of the BOOST C++ libraries are installed -INCLUDEPATH += ../boost - -HEADERS += endianfstream.hh \ - tree.hh \ - OriginObj.h \ - OriginFile.h \ - OriginParser.h \ - OriginDefaultParser.h \ - Origin600Parser.h \ - Origin610Parser.h \ - Origin700Parser.h \ - Origin750Parser.h \ - Origin800Parser.h \ - Origin810Parser.h - -SOURCES += OriginFile.cpp \ - OriginParser.cpp \ - OriginDefaultParser.cpp \ - Origin600Parser.cpp \ - Origin610Parser.cpp \ - Origin700Parser.cpp \ - Origin750Parser.cpp \ - Origin800Parser.cpp \ - Origin810Parser.cpp -- 1.7.3 |