-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
109 lines (89 loc) · 2.86 KB
/
CMakeLists.txt
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
cmake_minimum_required(VERSION 3.0)
project(MonteCrystal)
set(CMAKE_CXX_STANDARD 14)
find_package(OpenMP)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# Set the directory to your Qt installation here
set(Qt5_DIR C:/Qt/5.12.6/msvc2017_64/lib/cmake/Qt5)
find_package(Qt5 COMPONENTS Core Widgets Gui REQUIRED)
file(GLOB SOURCES "src/*.cpp")
include_directories(includes)
# Set the second directory here according to your system
# You will need the header files of
# CImg http://cimg.eu/
# spectra https://github.com/yixuan/spectra
# Eigen
# glm
include_directories(C:/Library/include)
message("platform detection")
if (WIN32)
add_definitions(-DWIN=1)
add_definitions(-DLINUX=0)
message("win")
elseif (UNIX)
add_definitions(-DWIN=0)
add_definitions(-DLINUX=1)
message("linux")
endif()
add_definitions(-DCMAKE_BUILD_TYPE=Release)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set ( MOC_HEADERS
includes/ExcitationVisualization.h
includes/GUIEnergyElements.h
includes/OGLWidget.h
includes/MainWindow.h
includes/AnisotropyWindow.h
includes/ColorsWindow.h
includes/CameraWindow.h
includes/CustomTableWidget.h
includes/ExcitationFrequencyWindow.h
includes/Experiment01Window.h
includes/FerromagnetWindow.h
includes/GUILatticeElements.h
includes/GUIOutputElements.h
includes/GUIProgramTypeElement.h
includes/GUISimulationProcedureElements.h
includes/GUISimulationProcedureElements.h
includes/GUISpinElements.h
includes/LatticeMaskWindow.h
includes/MarkedSpinsHandler.h
includes/MarkedSpinsRequestWindow.h
includes/MyHeaderView.h
includes/SkyrmionWindow.h
includes/SpinSpiralWindow.h
includes/WorkfolderWindow.h
includes/SimulationProgram.h
includes/ToolBarWidget.h
includes/OpenGLWidget.h
)
set ( UIS
includes/anisotropy.ui
includes/colors.ui
includes/excitationfrequencywindow.ui
includes/experiment01.ui
includes/ferromagnet.ui
includes/latticemaskwindow.ui
includes/mainWindow.ui
includes/markedspinsrequestwindow.ui
includes/skyrmion.ui
includes/spinspiral.ui
includes/workfolder.ui
includes/openglwidget.ui
includes/toolbar.ui
includes/camera.ui
)
QT5_ADD_RESOURCES( RES_SOURCES resources.qrc)
QT5_WRAP_UI(UI_HEADERS ${UIS})
QT5_WRAP_CPP(MOC_SRCS ${MOC_HEADERS})
add_executable(MonteCrystal ${SOURCES} ${MOC_SRCS} ${RES_SOURCES} ${UI_HEADERS} ${CMAKE_CURRENT_SOURCE_DIR}/src/app.rc git.h)
set_target_properties(MonteCrystal PROPERTIES AUTOGEN_BUILD_DIR ${CMAKE_BINARY_DIR})
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
find_package(X11 REQUIRED)
# Set path to your gsl installation
# under the path is expected: include/gsl/*.h
# and lib/*.lib
set(GSL_ROOT_DIR "C:/Library/gsl")
find_package(GSL REQUIRED)
include_directories(${GSL_INCLUDE_DIRS})
target_link_libraries(MonteCrystal Qt5::Core Qt5::Widgets Qt5::Gui Eigen3::Eigen ${GSL_LIBRARIES} ${X11_LIBRARIES})
add_custom_command(OUTPUT git.h COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/git.cmake)