aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
blob: 69d21794640ca50e8b10a1de7b4891b31ab33e90 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
cmake_minimum_required(VERSION 2.8.12)

project(pm)

# Change accordingly
get_filename_component(CUBU "../cubu" ABSOLUTE)

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()

find_library(CUBU_LIB
    NAMES cubu
    PATHS ${CUBU})
if (CUBU_LIB)
    message("Found CUBU: ${CUBU_LIB}")
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
    lineplot.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})

include_directories(
    ${CUBU}
    ${CUBU}/include)

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

install(TARGETS pm RUNTIME DESTINATION ${CMAKE_SOURCE_DIR})