aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: ccc7e5efb0595e57e69c266b1be51fec2eac9d50 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
cmake_minimum_required (VERSION 2.8.12)

project (pm)

if ((${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") OR (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang"))
    set(CMAKE_CXX_FLAGS "-std=c++11")
endif()

# Current dir should be included in search path, right? :)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

# Automatically run moc on Qt5 (sub-) classes
set(CMAKE_AUTOMOC ON)

# http://arma.sourceforge.net/
find_package(Armadillo)

# Will probably work with most CUDA releases
find_package(CUDA)

# Qt5 packages
find_package(Qt5 COMPONENTS Core Qml Quick Widgets)

# The application can significantly speed up some operations using multiple
# threads via OpenMP, if supported
find_package(OpenMP)
if (OPENMP_FOUND)
    #set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
    set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
endif()

# This is the only one tested, might work with other configs
set(CUDA_NVCC_FLAGS -arch=compute_30)

qt5_add_resources(RESOURCES
    pm.qrc)

cuda_add_executable(pm
    main.cpp
    barchart.cpp
    brushinghandler.cpp
    colormap.cpp
    colorscale.cpp
    continuouscolorscale.cpp
    dist.cpp
    divergentcolorscale.cpp
    forcescheme.cpp
    geometry.cpp
    historygraph.cpp
    knn.cpp
    lamp.cpp
    manipulationhandler.cpp
    mapscalehandler.cpp
    measures.cpp
    plmp.cpp
    projectionhistory.cpp
    scatterplot.cpp
    selectionhandler.cpp
    skelft.cu
    skelft_core.cpp
    transitioncontrol.cpp
    transitionworkerthread.cpp
    voronoisplat.cpp
    ${RESOURCES})

target_link_libraries(pm
    ${ARMADILLO_LIBRARIES}
    Qt5::Widgets
    Qt5::Qml
    Qt5::Quick)

install(TARGETS pm RUNTIME DESTINATION ${CMAKE_SOURCE_DIR})