aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-03-21 17:00:33 +0100
committerThomas White <taw@physics.org>2018-03-21 17:01:13 +0100
commitf825769ab8fd476eea207c6c061294aaf97b5744 (patch)
tree17a3d77194603ad56c026eb2378e9e6320ae2bd6 /CMakeLists.txt
parent53755d93445d7cfc49362f5c5c6dfa1770332ba2 (diff)
Compile hdfsee even if TIFF not present
TIFF adds a new feature (Save image as TIFF), but isn't required
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt47
1 files changed, 16 insertions, 31 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eecfd882..2ad2c0d1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -133,43 +133,28 @@ set_target_properties(pattern_sim PROPERTIES
# Build Target
# hdfsee
-if(GTK2_FOUND AND TIFF_FOUND)
+if (GTK2_FOUND)
- set(HDFSEE_SOURCES
- src/hdfsee.c
- src/dw-hdfsee.c
- src/hdfsee-render.c
- )
+ set(HDFSEE_SOURCES src/hdfsee.c src/dw-hdfsee.c src/hdfsee-render.c)
+ set(HDFSEE_RESOURCE_FILES data/hdfsee.ui)
+ add_executable(hdfsee ${HDFSEE_SOURCES})
- set(HDFSEE_RESOURCE_FILES
- data/hdfsee.ui
- )
+ target_include_directories(hdfsee PRIVATE ${COMMON_INCLUDES} ${GTK2_INCLUDE_DIRS})
+ target_link_libraries(hdfsee ${COMMON_LIBRARIES} ${GTK2_LIBRARIES})
- add_executable(hdfsee ${HDFSEE_SOURCES})
- target_include_directories(hdfsee PRIVATE
- ${COMMON_INCLUDES}
- ${TIFF_INCLUDE_DIRS}
- ${GTK2_INCLUDE_DIRS}
- )
- target_link_libraries(hdfsee
- ${COMMON_LIBRARIES}
- ${TIFF_LIBRARIES}
- ${GTK2_LIBRARIES}
- )
- set_target_properties(hdfsee PROPERTIES
- RESOURCE "${HDFSEE_RESOURCE_FILES}"
- )
+ if (TIFF_FOUND)
+ target_include_directories(hdfsee PRIVATE ${TIFF_INCLUDE_DIRS})
+ target_link_libraries(hdfsee ${TIFF_LIBRARIES})
+ endif (TIFF_FOUND)
- install(
- TARGETS
- hdfsee
+ set_target_properties(hdfsee PROPERTIES RESOURCE "${HDFSEE_RESOURCE_FILES}")
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- RESOURCE DESTINATION share/crystfel
- )
+ install (TARGETS hdfsee
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ RESOURCE DESTINATION share/crystfel)
-endif(GTK2_FOUND AND TIFF_FOUND)
+endif (GTK2_FOUND)
# ----------------------------------------------------------------------
# Build Target