CMakeLists.txt 13.2 KB
Newer Older
DreamSourceLab's avatar
DreamSourceLab committed
1
##
DreamSourceLab's avatar
DreamSourceLab committed
2
## This file is part of the DSView project.
DreamSourceLab's avatar
DreamSourceLab committed
3 4 5
##
## Copyright (C) 2012 Joel Holdsworth <joel@airwebreathe.org.uk>
## Copyright (C) 2012-2013 Alexandru Gagniuc <mr.nuke.me@gmail.com>
6
## Copyright (C) 2013-2014 DreamSourceLab <support@dreamsourcelab.com>
DreamSourceLab's avatar
DreamSourceLab committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 2 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program.  If not, see <http://www.gnu.org/licenses/>.
##

DreamSourceLab's avatar
DreamSourceLab committed
22 23
cmake_minimum_required(VERSION 2.8.6)

DreamSourceLab's avatar
DreamSourceLab committed
24 25 26
include(FindPkgConfig)
include(GNUInstallDirs)

DreamSourceLab's avatar
DreamSourceLab committed
27 28
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")

DreamSourceLab's avatar
DreamSourceLab committed
29
project(DSView)
DreamSourceLab's avatar
DreamSourceLab committed
30 31 32 33 34

#===============================================================================
#= User Options
#-------------------------------------------------------------------------------

35
option(DISABLE_WERROR "Build without -Werror" TRUE)
DreamSourceLab's avatar
DreamSourceLab committed
36
option(ENABLE_SIGNALS "Build with UNIX signals" TRUE)
DreamSourceLab's avatar
DreamSourceLab committed
37
option(ENABLE_DECODE "Build with libsigrokdecode4DSL" TRUE)
DreamSourceLab's avatar
DreamSourceLab committed
38
option(ENABLE_COTIRE "Enable cotire" FALSE)
DreamSourceLab's avatar
DreamSourceLab committed
39
option(ENABLE_TESTS "Enable unit tests" FALSE)
DreamSourceLab's avatar
DreamSourceLab committed
40 41
option(STATIC_PKGDEPS_LIBS "Statically link to (pkg-config) libraries" FALSE)
option(FORCE_QT4 "Force use of Qt4 even if Qt5 is available" FALSE)
DreamSourceLab's avatar
DreamSourceLab committed
42 43 44 45 46 47

if(WIN32)
	# On Windows/MinGW we need to statically link to libraries.
	# This option is user configurable, but enable it by default on win32.
	set(STATIC_PKGDEPS_LIBS TRUE)

DreamSourceLab's avatar
DreamSourceLab committed
48
	# Windows does not support UNIX signals.
DreamSourceLab's avatar
DreamSourceLab committed
49 50 51
	set(ENABLE_SIGNALS FALSE)
endif()

DreamSourceLab's avatar
DreamSourceLab committed
52 53 54 55 56 57
if(NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
      FORCE)
endif()

DreamSourceLab's avatar
DreamSourceLab committed
58 59 60 61 62
#===============================================================================
#= Dependencies
#-------------------------------------------------------------------------------

list(APPEND PKGDEPS
DreamSourceLab's avatar
DreamSourceLab committed
63
	"libsigrok4DSL >= 0.2.0"
64
	"libusb-1.0 >= 1.0.16"
65
	"libzip >= 0.10"
DreamSourceLab's avatar
DreamSourceLab committed
66
)
DreamSourceLab's avatar
DreamSourceLab committed
67
if(ENABLE_DECODE)
DreamSourceLab's avatar
DreamSourceLab committed
68
	list(APPEND PKGDEPS "libsigrokdecode4DSL>=0.4.0")
DreamSourceLab's avatar
DreamSourceLab committed
69
endif()
DreamSourceLab's avatar
DreamSourceLab committed
70 71 72 73

find_package(PkgConfig)
pkg_check_modules(PKGDEPS REQUIRED ${PKGDEPS})

DreamSourceLab's avatar
DreamSourceLab committed
74 75 76 77 78
if(FORCE_QT4)
	set(Qt5Core_FOUND FALSE)
else()
	find_package(Qt5Core QUIET)
endif()
DreamSourceLab's avatar
DreamSourceLab committed
79

DreamSourceLab's avatar
DreamSourceLab committed
80 81 82 83 84 85 86 87
if(Qt5Core_FOUND)
	message("-- Using Qt5")
	find_package(Qt5Widgets REQUIRED)
	find_package(Qt5Gui REQUIRED)
	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
	set(QT_INCLUDE_DIRS ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
	set(QT_LIBRARIES Qt5::Gui Qt5::Widgets)
	add_definitions(${Qt5Gui_DEFINITIONS} ${Qt5Widgets_DEFINITIONS})
DreamSourceLab's avatar
DreamSourceLab committed
88
else()
DreamSourceLab's avatar
DreamSourceLab committed
89 90
	find_program(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 qmake-mac)
	find_package(Qt4 REQUIRED)
DreamSourceLab's avatar
DreamSourceLab committed
91 92
endif()

DreamSourceLab's avatar
DreamSourceLab committed
93 94
find_package(Threads)

95
find_package(PythonLibs 3 EXACT)
DreamSourceLab's avatar
DreamSourceLab committed
96
find_package(Boost 1.42 COMPONENTS filesystem system thread REQUIRED)
97
find_package(libusb-1.0 REQUIRED)
98
find_package(libzip REQUIRED)
99
find_package(FFTW REQUIRED)
100

DreamSourceLab's avatar
DreamSourceLab committed
101 102 103 104
#===============================================================================
#= Config Header
#-------------------------------------------------------------------------------

DreamSourceLab's avatar
DreamSourceLab committed
105 106
set(DS_TITLE DSView)
set(DS_DESCRIPTION "A GUI for instruments of DreamSourceLab")
DreamSourceLab's avatar
DreamSourceLab committed
107

Andy Dneg's avatar
Andy Dneg committed
108
set(DS_VERSION_MAJOR 1)
DreamSourceLab's avatar
DreamSourceLab committed
109 110
set(DS_VERSION_MINOR 1)
set(DS_VERSION_MICRO 0)
DreamSourceLab's avatar
DreamSourceLab committed
111 112 113 114 115 116 117 118 119 120 121 122 123
set(DS_VERSION_STRING
	${DS_VERSION_MAJOR}.${DS_VERSION_MINOR}.${DS_VERSION_MICRO}
)

configure_file (
	${PROJECT_SOURCE_DIR}/config.h.in
	${PROJECT_BINARY_DIR}/config.h
)

#===============================================================================
#= Sources
#-------------------------------------------------------------------------------

DreamSourceLab's avatar
DreamSourceLab committed
124
set(DSView_SOURCES
Andy Dneg's avatar
Andy Dneg committed
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
    main.cpp
    pv/sigsession.cpp
    pv/mainwindow.cpp
    pv/devicemanager.cpp
    pv/data/snapshot.cpp
    pv/data/signaldata.cpp
    pv/data/logicsnapshot.cpp
    pv/data/logic.cpp
    pv/data/analogsnapshot.cpp
    pv/data/analog.cpp
    pv/dialogs/deviceoptions.cpp
    pv/prop/property.cpp
    pv/prop/int.cpp
    pv/prop/enum.cpp
    pv/prop/double.cpp
    pv/prop/bool.cpp
    pv/prop/binding/binding.cpp
    pv/toolbars/samplingbar.cpp
    pv/view/viewport.cpp
    pv/view/view.cpp
    pv/view/timemarker.cpp
    pv/view/signal.cpp
    pv/view/ruler.cpp
    pv/view/logicsignal.cpp
    pv/view/header.cpp
    pv/view/cursor.cpp
    pv/view/analogsignal.cpp
    pv/prop/binding/deviceoptions.cpp
    pv/toolbars/trigbar.cpp
    pv/toolbars/filebar.cpp
    pv/dock/protocoldock.cpp
    pv/dock/triggerdock.cpp
    pv/dock/measuredock.cpp
    pv/dock/searchdock.cpp
    pv/toolbars/logobar.cpp
    pv/data/groupsnapshot.cpp
    pv/view/groupsignal.cpp
    pv/data/group.cpp
    pv/dialogs/about.cpp
    pv/dialogs/search.cpp
    pv/data/dsosnapshot.cpp
166
    pv/data/dso.cpp
Andy Dneg's avatar
Andy Dneg committed
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
    pv/view/dsosignal.cpp
    pv/view/dsldial.cpp
    pv/dock/dsotriggerdock.cpp
    pv/view/trace.cpp
    pv/view/selectableitem.cpp
    pv/data/decoderstack.cpp
    pv/data/decode/rowdata.cpp
    pv/data/decode/row.cpp
    pv/data/decode/decoder.cpp
    pv/data/decode/annotation.cpp
    pv/view/decodetrace.cpp
    pv/prop/binding/decoderoptions.cpp
    pv/widgets/fakelineedit.cpp
    pv/widgets/decodermenu.cpp
    pv/widgets/decodergroupbox.cpp
    pv/prop/string.cpp
    pv/device/sessionfile.cpp
    pv/device/inputfile.cpp
    pv/device/file.cpp
    pv/device/devinst.cpp
    pv/dialogs/storeprogress.cpp
    pv/storesession.cpp
    pv/view/devmode.cpp
    pv/device/device.cpp
    pv/dialogs/waitingdialog.cpp
    pv/dialogs/dsomeasure.cpp
    pv/dialogs/calibration.cpp
    pv/data/decodermodel.cpp
    pv/dialogs/protocollist.cpp
    pv/dialogs/protocolexp.cpp
    pv/dialogs/fftoptions.cpp
    pv/data/mathstack.cpp
    pv/view/mathtrace.cpp
    dsapplication.cpp
    pv/toolbars/titlebar.cpp
    pv/mainframe.cpp
    pv/widgets/border.cpp
    pv/dialogs/dsmessagebox.cpp
    pv/dialogs/shadow.cpp
206
    pv/dialogs/dsdialog.cpp
207
    pv/dialogs/interval.cpp
DreamSourceLab's avatar
DreamSourceLab committed
208
    pv/prop/binding/probeoptions.cpp
Andy Dneg's avatar
Andy Dneg committed
209 210 211 212 213 214 215 216
    pv/view/viewstatus.cpp
    pv/dialogs/lissajousoptions.cpp
    pv/view/lissajoustrace.cpp
    pv/view/spectrumtrace.cpp
    pv/data/spectrumstack.cpp
    pv/dialogs/mathoptions.cpp
    pv/dialogs/regionoptions.cpp
    pv/view/xcursor.cpp
DreamSourceLab's avatar
DreamSourceLab committed
217 218
)

DreamSourceLab's avatar
DreamSourceLab committed
219
set(DSView_HEADERS
Andy Dneg's avatar
Andy Dneg committed
220
    pv/sigsession.h
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
    pv/mainwindow.h
    pv/dialogs/deviceoptions.h
    pv/prop/property.h
    pv/prop/int.h
    pv/prop/enum.h
    pv/prop/double.h
    pv/prop/bool.h
    pv/toolbars/samplingbar.h
    pv/view/viewport.h
    pv/view/view.h
    pv/view/timemarker.h
    pv/view/ruler.h
    pv/view/header.h
    pv/view/cursor.h
    pv/toolbars/trigbar.h
    pv/toolbars/filebar.h
    pv/dock/protocoldock.h
    pv/dock/triggerdock.h
    pv/dock/measuredock.h
    pv/dock/searchdock.h
    pv/toolbars/logobar.h
    pv/dialogs/about.h
    pv/dialogs/search.h
    pv/dock/dsotriggerdock.h
    pv/view/trace.h
    pv/view/selectableitem.h
    pv/data/decoderstack.h
    pv/view/decodetrace.h
    pv/widgets/fakelineedit.h
    pv/widgets/decodermenu.h
    pv/widgets/decodergroupbox.h
    pv/prop/string.h
    pv/device/devinst.h
    pv/dialogs/storeprogress.h
    pv/storesession.h
    pv/view/devmode.h
    pv/dialogs/waitingdialog.h
    pv/dialogs/dsomeasure.h
    pv/dialogs/calibration.h
    pv/dialogs/protocollist.h
    pv/dialogs/protocolexp.h
    pv/dialogs/fftoptions.h
    pv/data/mathstack.h
    pv/view/mathtrace.h
Andy Dneg's avatar
Andy Dneg committed
265
    pv/view/viewstatus.h
266 267 268 269 270 271
    pv/toolbars/titlebar.h
    pv/mainframe.h
    pv/widgets/border.h
    pv/dialogs/dsmessagebox.h
    pv/dialogs/shadow.h
    pv/dialogs/dsdialog.h
272
    pv/dialogs/interval.h
Andy Dneg's avatar
Andy Dneg committed
273 274 275 276 277 278 279 280 281 282 283
    pv/dialogs/lissajousoptions.h
    pv/view/lissajoustrace.h
    pv/view/spectrumtrace.h
    pv/data/spectrumstack.h
    pv/dialogs/mathoptions.h
    pv/dialogs/regionoptions.h
    pv/view/xcursor.h
    pv/view/signal.h
    pv/view/logicsignal.h
    pv/view/analogsignal.h
    pv/view/dsosignal.h
DreamSourceLab's avatar
DreamSourceLab committed
284 285
)

DreamSourceLab's avatar
DreamSourceLab committed
286
set(DSView_FORMS
DreamSourceLab's avatar
DreamSourceLab committed
287 288
)

DreamSourceLab's avatar
DreamSourceLab committed
289
set(DSView_RESOURCES
DreamSourceLab's avatar
DreamSourceLab committed
290
    DSView.qrc
Andy Dneg's avatar
Andy Dneg committed
291 292
    themes/breeze.qrc
    languages/language.qrc
DreamSourceLab's avatar
DreamSourceLab committed
293 294
)

DreamSourceLab's avatar
DreamSourceLab committed
295
if(ENABLE_DECODE)
DreamSourceLab's avatar
DreamSourceLab committed
296
	list(APPEND DSView_SOURCES
DreamSourceLab's avatar
DreamSourceLab committed
297 298 299 300 301 302 303 304 305 306 307 308
	        pv/dock/protocoldock.cpp
		pv/data/decoderstack.cpp
		pv/data/decode/annotation.cpp
		pv/data/decode/decoder.cpp
		pv/data/decode/row.cpp
		pv/data/decode/rowdata.cpp
		pv/prop/binding/decoderoptions.cpp
		pv/view/decodetrace.cpp
		pv/widgets/decodergroupbox.cpp
		pv/widgets/decodermenu.cpp
	)

DreamSourceLab's avatar
DreamSourceLab committed
309
	list(APPEND DSView_HEADERS
DreamSourceLab's avatar
DreamSourceLab committed
310 311 312 313 314 315 316 317 318
	        pv/dock/protocoldock.h
		pv/data/decoderstack.h
		pv/view/decodetrace.h
		pv/widgets/decodergroupbox.h
		pv/widgets/decodermenu.h
	)
endif()

if(WIN32)
DreamSourceLab's avatar
DreamSourceLab committed
319
	# Use the DSView icon for the DSView.exe executable.
DreamSourceLab's avatar
DreamSourceLab committed
320 321
	set(CMAKE_RC_COMPILE_OBJECT "${CMAKE_RC_COMPILER} -O coff -I${CMAKE_CURRENT_SOURCE_DIR} <SOURCE> <OBJECT>")
	enable_language(RC)
DreamSourceLab's avatar
DreamSourceLab committed
322
	list(APPEND DSView_SOURCES DSView.rc)
DreamSourceLab's avatar
DreamSourceLab committed
323 324 325
endif()

if(Qt5Core_FOUND)
DreamSourceLab's avatar
DreamSourceLab committed
326 327 328
	qt5_wrap_cpp(DSView_HEADERS_MOC ${DSView_HEADERS})
	qt5_wrap_ui(DSView_FORMS_HEADERS ${DSView_FORMS})
	qt5_add_resources(DSView_RESOURCES_RCC ${DSView_RESOURCES})
DreamSourceLab's avatar
DreamSourceLab committed
329
else()
DreamSourceLab's avatar
DreamSourceLab committed
330 331 332
	qt4_wrap_cpp(DSView_HEADERS_MOC ${DSView_HEADERS})
	qt4_wrap_ui(DSView_FORMS_HEADERS ${DSView_FORMS})
	qt4_add_resources(DSView_RESOURCES_RCC ${DSView_RESOURCES})
DreamSourceLab's avatar
DreamSourceLab committed
333 334
	include(${QT_USE_FILE})
endif()
DreamSourceLab's avatar
DreamSourceLab committed
335 336 337 338 339 340

#===============================================================================
#= Global Definitions
#-------------------------------------------------------------------------------

add_definitions(${QT_DEFINITIONS})
341
add_definitions(-std=c++11 -Wall -Wextra -Wno-return-type -Wno-ignored-qualifiers)
DreamSourceLab's avatar
DreamSourceLab committed
342

DreamSourceLab's avatar
DreamSourceLab committed
343 344 345 346
if(ENABLE_DECODE)
        add_definitions(-DENABLE_DECODE)
endif()

DreamSourceLab's avatar
DreamSourceLab committed
347
if(NOT DISABLE_WERROR)
DreamSourceLab's avatar
DreamSourceLab committed
348
        add_definitions(-Werror)
DreamSourceLab's avatar
DreamSourceLab committed
349 350 351 352 353 354 355 356 357 358
endif()

#===============================================================================
#= Global Include Directories
#-------------------------------------------------------------------------------

include_directories(
	${CMAKE_CURRENT_BINARY_DIR}
	${CMAKE_CURRENT_SOURCE_DIR}
	${Boost_INCLUDE_DIRS}
DreamSourceLab's avatar
DreamSourceLab committed
359
	${QT_INCLUDE_DIRS}
DreamSourceLab's avatar
DreamSourceLab committed
360 361 362 363 364 365 366 367 368 369 370 371 372 373
)

if(STATIC_PKGDEPS_LIBS)
	include_directories(${PKGDEPS_STATIC_INCLUDE_DIRS})
else()
	include_directories(${PKGDEPS_INCLUDE_DIRS})
endif()

#===============================================================================
#= Linker Configuration
#-------------------------------------------------------------------------------

link_directories(${Boost_LIBRARY_DIRS})

DreamSourceLab's avatar
DreamSourceLab committed
374
set(DSVIEW_LINK_LIBS
DreamSourceLab's avatar
DreamSourceLab committed
375 376 377
	${Boost_LIBRARIES}
	${CMAKE_THREAD_LIBS_INIT}
	${QT_LIBRARIES}
378
        ${LIBUSB_1_LIBRARIES}
379
        ${FFTW_LIBRARIES}
DreamSourceLab's avatar
DreamSourceLab committed
380 381 382 383
)

if(STATIC_PKGDEPS_LIBS)
	link_directories(${PKGDEPS_STATIC_LIBRARY_DIRS})
DreamSourceLab's avatar
DreamSourceLab committed
384
	list(APPEND DSVIEW_LINK_LIBS ${PKGDEPS_STATIC_LIBRARIES})
DreamSourceLab's avatar
DreamSourceLab committed
385 386 387 388
if(WIN32)
	# Workaround for a MinGW linking issue.
	list(APPEND PULSEVIEW_LINK_LIBS "-llzma -llcms2")
endif()
DreamSourceLab's avatar
DreamSourceLab committed
389 390
else()
	link_directories(${PKGDEPS_LIBRARY_DIRS})
DreamSourceLab's avatar
DreamSourceLab committed
391
	list(APPEND DSVIEW_LINK_LIBS ${PKGDEPS_LIBRARIES})
DreamSourceLab's avatar
DreamSourceLab committed
392 393
endif()

394
list(APPEND DSVIEW_LINK_LIBS ${PYTHON_LIBRARIES})
DreamSourceLab's avatar
DreamSourceLab committed
395

DreamSourceLab's avatar
DreamSourceLab committed
396
add_executable(${PROJECT_NAME}
DreamSourceLab's avatar
DreamSourceLab committed
397 398 399 400
	${DSView_SOURCES}
	${DSView_HEADERS_MOC}
	${DSView_FORMS_HEADERS}
	${DSView_RESOURCES_RCC}
DreamSourceLab's avatar
DreamSourceLab committed
401 402
)

DreamSourceLab's avatar
DreamSourceLab committed
403
target_link_libraries(${PROJECT_NAME} ${DSVIEW_LINK_LIBS})
DreamSourceLab's avatar
DreamSourceLab committed
404 405 406 407 408

if(WIN32)
# Pass -mwindows so that no "DOS box" will open when PulseView is started.
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-mwindows")
endif()
DreamSourceLab's avatar
DreamSourceLab committed
409 410 411 412 413 414


if(ENABLE_COTIRE)
	include(cotire)
	cotire(${PROJECT_NAME})
endif()
415
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
DreamSourceLab's avatar
DreamSourceLab committed
416 417 418 419 420 421 422

#===============================================================================
#= Installation
#-------------------------------------------------------------------------------

# Install the executable.
install(TARGETS ${PROJECT_NAME} DESTINATION bin/)
423
install(DIRECTORY res DESTINATION share/${PROJECT_NAME})
424
install(FILES icons/logo.png DESTINATION share/${PROJECT_NAME} RENAME logo.png)
Andy Dneg's avatar
Andy Dneg committed
425 426 427 428
install(FILES ../NEWS25 DESTINATION share/${PROJECT_NAME} RENAME NEWS25)
install(FILES ../NEWS31 DESTINATION share/${PROJECT_NAME} RENAME NEWS31)
install(FILES ../ug25.pdf DESTINATION share/${PROJECT_NAME} RENAME ug25.pdf)
install(FILES ../ug31.pdf DESTINATION share/${PROJECT_NAME} RENAME ug31.pdf)
429 430
install(FILES DreamSourceLab.rules DESTINATION /etc/udev/rules.d/)
install(FILES DSView.desktop DESTINATION /usr/share/applications/)
DreamSourceLab's avatar
DreamSourceLab committed
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454

#===============================================================================
#= Packaging (handled by CPack)
#-------------------------------------------------------------------------------

set(CPACK_PACKAGE_VERSION_MAJOR ${DS_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${DS_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${DS_VERSION_MICRO})
set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/README)
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/COPYING)
set(CPACK_SOURCE_IGNORE_FILES ${CMAKE_CURRENT_BINARY_DIR} ".gitignore" ".git")
set(CPACK_SOURCE_PACKAGE_FILE_NAME
	"${CMAKE_PROJECT_NAME}-${DS_VERSION_MAJOR}.${DS_VERSION_MINOR}.${DS_VERSION_MICRO}")
set(CPACK_SOURCE_GENERATOR "TGZ")

include(CPack)

#===============================================================================
#= Tests
#-------------------------------------------------------------------------------

if(ENABLE_TESTS)
	add_subdirectory(test)
	enable_testing()
DreamSourceLab's avatar
DreamSourceLab committed
455
	add_test(test ${CMAKE_CURRENT_BINARY_DIR}/test/DSView-test)
DreamSourceLab's avatar
DreamSourceLab committed
456
endif(ENABLE_TESTS)