Debian Codegraph @

src/CMakeLists.txt

raw
1 #
2 # Advanced Simulation Library <http://asl.org.il>
3 #
4 # Copyright 2015 Avtech Scientific <http://avtechscientific.com>
5 #
6 #
7 # This file is part of Advanced Simulation Library (ASL).
8 #
9 # ASL is free software: you can redistribute it and/or modify it
10 # under the terms of the GNU Affero General Public License as
11 # published by the Free Software Foundation, version 3 of the License.
12 #
13 # ASL is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU Affero General Public License for more details.
17 #
18 # You should have received a copy of the GNU Affero General Public License
19 # along with ASL. If not, see <http://www.gnu.org/licenses/>.
20 #
21
22
23 # ToDo: recheck here and everywhere whether all listed
24 # _PUBLIC_HEADERS are indeed needed and if not move them
25 # to the _SOURCES (or _PRIVATE_HEADERS?)
26
27 add_subdirectory(acl)
28 add_subdirectory(num)
29 add_subdirectory(numExtend)
30
31 include(data/asldata.cmake)
32 include(math/aslmath.cmake)
33
34 include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/acl)
35
36
37 # aslcommon
38
39 set(aslcommon_PUBLIC_HEADERS
40 utilities/aslTimeStamp.h
41 aslUtilities.h
42 )
43
44 set(aslcommon_SOURCES
45 utilities/aslTimeStamp.cxx
46 aslUtilities.cxx
47 )
48
49 add_library(aslcommon ${aslcommon_PUBLIC_HEADERS} ${aslcommon_SOURCES})
50 target_link_libraries(aslcommon PRIVATE ${OpenCL_LIBRARIES})
51 INSTALL_SUBLIB(aslcommon aslcommon_PUBLIC_HEADERS)
52
53
54 # asl
55
56 set(asl_PUBLIC_HEADERS
57 ${asldata_PUBLIC_HEADERS}
58 ${aslmath_PUBLIC_HEADERS}
59 aslGenerators.h
60 utilities/aslParametersManager.h
61 utilities/aslTimer.h
62 utilities/aslUValue.h
63 utilities/aslGlobalSpace.h
64 utilities/aslSmartPtrUtils.h
65 writers/aslABDFormat.h
66 writers/aslWriter.h
67 aslDataInc.h
68 aslGeomInc.h
69 )
70
71 set(asl_SOURCES
72 ${asldata_SOURCES}
73 ${aslmath_SOURCES}
74 aslGenerators.cxx
75 utilities/aslParametersManager.cxx
76 writers/aslABDFormat.cxx
77 writers/aslWriter.cxx
78 aslDataInc.cxx
79 aslGeomInc.cxx
80 )
81
82 add_library(asl ${asl_PUBLIC_HEADERS} ${asl_SOURCES})
83 target_link_libraries(asl PUBLIC aslcommon aslacl PRIVATE ${Boost_LIBRARIES})
84 INSTALL_SUBLIB(asl asl_PUBLIC_HEADERS)
85
86
87 # aslvtk
88
89 set(aslvtk_PUBLIC_HEADERS
90 utilities/aslVTKCasters.h
91 utilities/aslVTKDataGenerators.h
92 writers/aslVTKFormatWriters.h
93 readers/aslVTKFormatReaders.h
94 )
95
96 set(aslvtk_SOURCES
97 utilities/aslVTKCasters.cxx
98 utilities/aslVTKDataGenerators.cxx
99 writers/aslVTKFormatWriters.cxx
100 readers/aslVTKFormatReaders.cxx
101 )
102
103 add_library(aslvtk ${aslvtk_PUBLIC_HEADERS} ${aslvtk_SOURCES})
104 target_link_libraries(aslvtk PRIVATE aslacl asl
105 ${VTK_LIBRARIES} ${OpenCL_LIBRARIES}
106 ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
107 INSTALL_SUBLIB(aslvtk aslvtk_PUBLIC_HEADERS)
108
109
110 # aslmatio
111
112 if (WITH_MATIO)
113 find_package(MATIO 1.5.2 REQUIRED)
114 include_directories(SYSTEM ${MATIO_INCLUDE_DIRS})
115
116 set(aslmatio_PUBLIC_HEADERS
117 utilities/aslMATLABCasters.h
118 writers/aslMATFormat.h
119 )
120
121 set(aslmatio_SOURCES
122 utilities/aslMATLABCasters.cxx
123 writers/aslMATFormat.cxx
124 )
125
126 add_library(aslmatio ${aslmatio_PUBLIC_HEADERS} ${aslmatio_SOURCES})
127 target_link_libraries(aslmatio PRIVATE aslacl ${MATIO_LIBRARIES} ${OpenCL_LIBRARIES})
128 INSTALL_SUBLIB(aslmatio aslmatio_PUBLIC_HEADERS)
129 endif (WITH_MATIO)