-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
54 lines (40 loc) · 1.56 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
cmake_minimum_required(VERSION 3.18)
project(radiatedPower VERSION 0.1.0)
# Compiler/build settings
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Locate the ROOT package
list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
find_package(ROOT REQUIRED COMPONENTS MathCore RIO Hist Tree Net)
include(${ROOT_USE_FILE})
include_directories(${CMAKE_SOURCE_DIR} ${ROOT_INCLUDE_DIRS})
add_definitions(${ROOT_CXX_FLAGS})
# Locate Boost libraries
find_package(Boost 1.73.0 REQUIRED ALL HINTS $ENV{BOOST_DIR})
include_directories(${Boost_INCLUDE_DIRS})
# Locate HDF5
find_package(HDF5 COMPONENTS C CXX HL REQUIRED)
link_directories(${HDF5_LIBRARY_DIRS})
include_directories(${HDF5_INCLUDE_DIRS})
# Locate FFTW3
find_package(FFTW3 REQUIRED)
# Set build locations for libraries and binaries
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
# Add libraries
add_subdirectory(BasicFunctions)
list(APPEND EXTRA_LIBS BasicFunctions)
list(APPEND EXTRA_INCLUDES "${PROJECT_SOURCE_DIR}/BasicFunctions")
add_subdirectory(FieldClasses)
list(APPEND EXTRA_LIBS FieldClasses)
list(APPEND EXTRA_INCLUDES "${PROJECT_SOURCE_DIR}/FieldClasses")
add_subdirectory(SignalProcessing)
list(APPEND EXTRA_LIBS SignalProcessing)
list(APPEND EXTRA_INCLUDES "${PROJECT_SOURCE_DIR}/SignalProcessing")
add_subdirectory(Antennas)
list(APPEND EXTRA_LIBS Antennas)
list(APPEND EXTRA_INCLUDES "${PROJECT_SOURCE_DIR}/Antennas")
add_subdirectory(ElectronDynamics)
add_subdirectory(Scattering)
add_subdirectory(executables)