Add export format options: CSV, JSON, PPM
[gencolormap.git] / CMakeLists.txt
1 # Copyright (C) 2015, 2016
2 # Computer Graphics Group, University of Siegen
3 # Written by Martin Lambers <martin.lambers@uni-siegen.de>
4 #
5 # Copying and distribution of this file, with or without modification, are
6 # permitted in any medium without royalty provided the copyright notice and this
7 # notice are preserved. This file is offered as-is, without any warranty.
8
9 cmake_minimum_required(VERSION 2.8)
10 set(CMAKE_AUTOMOC ON)
11 set(CMAKE_INCLUDE_CURRENT_DIR ON)
12
13 if(CMAKE_COMPILER_IS_GNUCXX)
14         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra")
15 endif()
16
17 find_package(Qt5Widgets QUIET)
18
19 add_executable(gencolormap cmdline.cpp colormap.hpp colormap.cpp)
20 install(TARGETS gencolormap RUNTIME DESTINATION bin)
21
22 if(Qt5Widgets_FOUND)
23         qt5_add_resources(GUI_RESOURCES gui.qrc)
24         add_executable(gencolormap-gui gui.cpp
25                 colormapwidgets.hpp colormapwidgets.cpp
26                 testwidget.hpp testwidget.cpp
27                 colormap.hpp colormap.cpp ${GUI_RESOURCES})
28         target_link_libraries(gencolormap-gui Qt5::Widgets)
29         install(TARGETS gencolormap-gui RUNTIME DESTINATION bin)
30 endif()