-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathCMakeLists.txt
51 lines (41 loc) · 1.77 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
cmake_minimum_required(VERSION 2.6)
project(PHILIPS-TO-ISMRMRD)
#VERSIONING
set(PHILIPS_TO_ISMRMRD_VERSION_MAJOR 0)
set(PHILIPS_TO_ISMRMRD_VERSION_MINOR 0)
set(PHILIPS_TO_ISMRMRD_VERSION_PATCH 1)
set(PHILIPS_TO_ISMRMRD_VERSION_STRING ${PHILIPS_TO_ISMRMRD_VERSION_MAJOR}.${PHILIPS_TO_ISMRMRD_VERSION_MINOR}.${PHILIPS_TO_ISMRMRD_VERSION_PATCH})
if (WIN32)
ADD_DEFINITIONS(-DWIN32 -D_WIN32 -D_WINDOWS)
# ADD_DEFINITIONS(-DUNICODE -D_UNICODE)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /MP")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3")
set (CMAKE_EXE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
set (CMAKE_SHARED_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
set (CMAKE_STATIC_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
set (CMAKE_MODULE_LINKER_FLAGS_DEBUG "/debug /INCREMENTAL:NO")
#ADD_DEFINITIONS(-D__BUILD_CONVERTER_TINYXML__)
else ()
if (UNIX)
if (APPLE)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
else ()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -std=c++11")
endif ()
endif ()
endif ()
# Added for static linking!!!
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost COMPONENTS thread system program_options filesystem REQUIRED)
find_package(LibXml2 REQUIRED)
find_package(LibXslt REQUIRED)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR} ${LIBXML2_INCLUDE_DIR} ${LIBXSLT_INCLUDE_DIR})
find_package(ISMRMRD REQUIRED)
find_package(HDF5 1.8 REQUIRED COMPONENTS C)
INCLUDE_DIRECTORIES( ${ISMRMRD_INCLUDE_DIR} ${HDF5_C_INCLUDE_DIR})
link_directories( ${ISMRMRD_LIB_DIR} )
add_executable(philips_to_ismrmrd
main.cpp
pugixml.cpp)
target_link_libraries(philips_to_ismrmrd ${LIBXSLT_LIBRARIES} ${LIBXML2_LIBRARIES} ${ISMRMRD_LIBRARIES} ${Boost_LIBRARIES})
install(TARGETS philips_to_ismrmrd DESTINATION bin)