Add support for Texinfo-5.0.
[ginac.git] / ginac / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.6)
2
3 set(ginaclib_sources
4     add.cpp
5     archive.cpp
6     basic.cpp
7     clifford.cpp
8     color.cpp
9     constant.cpp
10     excompiler.cpp
11     ex.cpp
12     expair.cpp
13     expairseq.cpp
14     exprseq.cpp
15     factor.cpp
16     fail.cpp
17     fderivative.cpp
18     function.cpp
19     idx.cpp
20     indexed.cpp
21     inifcns.cpp
22     inifcns_gamma.cpp
23     inifcns_nstdsums.cpp
24     inifcns_trans.cpp
25     integral.cpp
26     lst.cpp
27     matrix.cpp
28     mul.cpp
29     ncmul.cpp
30     normal.cpp
31     numeric.cpp
32     operators.cpp
33     parser/default_reader.cpp
34     parser/lexer.cpp
35     parser/parse_binop_rhs.cpp
36     parser/parse_context.cpp
37     parser/parser_compat.cpp
38     parser/parser.cpp
39     polynomial/chinrem_gcd.cpp
40     polynomial/collect_vargs.cpp
41     polynomial/cra_garner.cpp
42     polynomial/divide_in_z_p.cpp
43     polynomial/gcd_uvar.cpp
44     polynomial/mgcd.cpp
45     polynomial/mod_gcd.cpp
46     polynomial/optimal_vars_finder.cpp
47     polynomial/pgcd.cpp
48     polynomial/primpart_content.cpp
49     polynomial/upoly_io.cpp
50     power.cpp
51     print.cpp
52     pseries.cpp
53     registrar.cpp
54     relational.cpp
55     remember.cpp
56     symbol.cpp
57     symmetry.cpp
58     tensor.cpp
59     utils.cpp
60     wildcard.cpp
61 )
62
63 set(ginaclib_public_headers
64     ginac.h
65     add.h
66     archive.h
67     assertion.h
68     basic.h
69     class_info.h
70     clifford.h
71     color.h
72     constant.h
73     container.h
74     ex.h
75     excompiler.h
76     expair.h
77     expairseq.h 
78     exprseq.h
79     fail.h
80     factor.h
81     fderivative.h
82     flags.h
83     ${CMAKE_CURRENT_BINARY_DIR}/function.h
84     hash_map.h
85     idx.h
86     indexed.h 
87     inifcns.h
88     integral.h
89     lst.h
90     matrix.h
91     mul.h
92     ncmul.h
93     normal.h
94     numeric.h
95     operators.h 
96     power.h
97     print.h
98     pseries.h
99     ptr.h
100     registrar.h
101     relational.h
102     structure.h 
103     symbol.h
104     symmetry.h
105     tensor.h
106     version.h
107     wildcard.h 
108     parser/parser.h 
109     parser/parse_context.h
110 )
111
112 set(ginaclib_private_headers
113     remember.h
114     tostring.h
115     utils.h
116     crc32.h
117     hash_seed.h
118     compiler.h
119     parser/lexer.h
120     parser/debug.h
121     polynomial/gcd_euclid.h
122     polynomial/remainder.h
123     polynomial/normalize.h
124     polynomial/upoly.h
125     polynomial/ring_traits.h
126     polynomial/mod_gcd.h
127     polynomial/cra_garner.h
128     polynomial/upoly_io.h
129     polynomial/prem_uvar.h
130     polynomial/eval_uvar.h
131     polynomial/interpolate_padic_uvar.h
132     polynomial/sr_gcd_uvar.h
133     polynomial/heur_gcd_uvar.h
134     polynomial/chinrem_gcd.h
135     polynomial/collect_vargs.h
136     polynomial/divide_in_z_p.h
137     polynomial/euclid_gcd_wrap.h
138     polynomial/eval_point_finder.h
139     polynomial/newton_interpolate.h
140     polynomial/optimal_vars_finder.h
141     polynomial/pgcd.h
142     polynomial/poly_cra.h
143     polynomial/primes_factory.h
144     polynomial/smod_helpers.h
145     polynomial/debug.h
146 )
147
148 add_library(ginac ${ginaclib_sources})
149 set_target_properties(ginac PROPERTIES
150         SOVERSION ${ginaclib_soversion}
151         VERSION ${ginaclib_version})
152 target_link_libraries(ginac ${CLN_LIBRARIES})
153 include_directories(${CMAKE_SOURCE_DIR}/ginac)
154
155 if (NOT BUILD_SHARED_LIBS)
156         set_target_properties(ginac PROPERTIES OUTPUT_NAME "ginac")
157         # Avoid the static library vs import library conflict (necessary for
158         # m$ toolchain).
159         set_target_properties(ginac PROPERTIES PREFIX "lib")
160 endif()
161
162 install(TARGETS ginac LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
163                       RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
164                       ARCHIVE DESTINATION "${LIB_INSTALL_DIR}")
165 install(FILES ${ginaclib_public_headers} DESTINATION "${INCLUDE_INSTALL_DIR}/ginac")
166
167 add_custom_command(
168         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/function.h
169         COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/function.py -o ${CMAKE_CURRENT_BINARY_DIR}/function.h ${CMAKE_CURRENT_SOURCE_DIR}/function.hppy
170         DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/function.hppy ${CMAKE_CURRENT_SOURCE_DIR}/function.py)
171
172 add_custom_command(
173         OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/function.cpp
174         COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/function.py -o ${CMAKE_CURRENT_BINARY_DIR}/function.cpp ${CMAKE_CURRENT_SOURCE_DIR}/function.cppy
175         DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/function.h ${CMAKE_CURRENT_SOURCE_DIR}/function.cppy ${CMAKE_CURRENT_SOURCE_DIR}/function.py)
176