Created
June 20, 2015 03:59
-
-
Save marcinwol/9421a9a26381b796a027 to your computer and use it in GitHub Desktop.
Basic CMakeLists.txt for DCMTK 3.6.0 that is avaliable for Ubuntu 14.04
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 is example of the cmake file that can be used for basic compilation of a C++11 program | |
# that uses DCMTK 3.6.0 avaliable in ubuntu 14.04 | |
# to install DCMTK 3.6.0 for ubuntu 14.04 | |
# sudo apt-get install libdcmtk2-dev | |
cmake_minimum_required(VERSION 2.8) | |
# name of the cpp project | |
project(testDMCTK) | |
# cpp flags | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | |
# specify that we have a config file. This is required, since DCMTK package for Ubuntu 14.04 | |
# uses /usr/include/dcmtk/config/cfunix.h to setup dcmtk. The file is only loaded by | |
# DCMTK's /usr/include/dcmtk/config/osconfig.h when HAVE_CONFIG_H is set. | |
add_definitions(-DHAVE_CONFIG_H) | |
set(SOURCE_FILES main.cpp) | |
# search for DCMTK library and header files | |
find_package(DCMTK REQUIRED) | |
# specify DCMTK header include directories | |
include_directories(${DCMTK_INCLUDE_DIRS}) | |
# set output executable of our test program | |
add_executable(testDMCTK ${SOURCE_FILES}) | |
# link DCMTK library files | |
target_link_libraries(testDMCTK ${DCMTK_LIBRARIES}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment