rdkit_chem 2019.03.3.1 → 2025.09.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/CMakeLists.txt +713 -0
  3. data/Code/CMakeLists.txt +44 -0
  4. data/Code/RubyWrappers/Abbreviations.i +19 -0
  5. data/Code/RubyWrappers/AddHs.i +34 -0
  6. data/Code/RubyWrappers/Atom.i +165 -0
  7. data/Code/RubyWrappers/AtomIterators.i +77 -0
  8. data/Code/RubyWrappers/AtomPairs.i +95 -0
  9. data/Code/RubyWrappers/AvalonLib.i +41 -0
  10. data/Code/RubyWrappers/BitOps.i +72 -0
  11. data/Code/RubyWrappers/Bond.i +87 -0
  12. data/Code/RubyWrappers/BondIterators.i +61 -0
  13. data/Code/RubyWrappers/CMakeLists.txt +67 -0
  14. data/Code/RubyWrappers/Canon.i +40 -0
  15. data/Code/RubyWrappers/ChemDraw.i +81 -0
  16. data/Code/RubyWrappers/ChemReactions.i +166 -0
  17. data/Code/RubyWrappers/ChemTransforms.i +126 -0
  18. data/Code/RubyWrappers/Conformer.i +69 -0
  19. data/Code/RubyWrappers/Descriptors.i +64 -0
  20. data/Code/RubyWrappers/Dict.i +45 -0
  21. data/Code/RubyWrappers/DistGeom.i +217 -0
  22. data/Code/RubyWrappers/DiversityPick.h +49 -0
  23. data/Code/RubyWrappers/DiversityPick.i +10 -0
  24. data/Code/RubyWrappers/ErrorGenerator.i +73 -0
  25. data/Code/RubyWrappers/ExplicitBitVect.i +76 -0
  26. data/Code/RubyWrappers/FMCS.i +63 -0
  27. data/Code/RubyWrappers/FilterCatalog.i +154 -0
  28. data/Code/RubyWrappers/Fingerprints.i +56 -0
  29. data/Code/RubyWrappers/ForceField.i +161 -0
  30. data/Code/RubyWrappers/GeneralizedSubstruct.i +38 -0
  31. data/Code/RubyWrappers/GenericRDKitException.h +27 -0
  32. data/Code/RubyWrappers/Inchi.i +38 -0
  33. data/Code/RubyWrappers/MolBundle.i +16 -0
  34. data/Code/RubyWrappers/MolDraw2D.i +117 -0
  35. data/Code/RubyWrappers/MolEnumerator.i +45 -0
  36. data/Code/RubyWrappers/MolHash.i +25 -0
  37. data/Code/RubyWrappers/MolOps.i +72 -0
  38. data/Code/RubyWrappers/MolStandardize.i +37 -0
  39. data/Code/RubyWrappers/MolSupplier.i +83 -0
  40. data/Code/RubyWrappers/MolTransforms.i +39 -0
  41. data/Code/RubyWrappers/MolWriters.i +41 -0
  42. data/Code/RubyWrappers/MonomerInfo.i +42 -0
  43. data/Code/RubyWrappers/MorganFingerprints.h +21 -0
  44. data/Code/RubyWrappers/MorganFingerprints.i +66 -0
  45. data/Code/RubyWrappers/PeriodicTable.i +44 -0
  46. data/Code/RubyWrappers/Queries.i +289 -0
  47. data/Code/RubyWrappers/QueryAtom.i +47 -0
  48. data/Code/RubyWrappers/QueryBond.i +47 -0
  49. data/Code/RubyWrappers/QueryOps.i +44 -0
  50. data/Code/RubyWrappers/RDKitExceptions.i +75 -0
  51. data/Code/RubyWrappers/RDLogger.i +74 -0
  52. data/Code/RubyWrappers/RDProps.i +44 -0
  53. data/Code/RubyWrappers/RGroupDecomposition.i +52 -0
  54. data/Code/RubyWrappers/ROMol.i +695 -0
  55. data/Code/RubyWrappers/RWMol.i +241 -0
  56. data/Code/RubyWrappers/RascalMCES.i +71 -0
  57. data/Code/RubyWrappers/ReactionFingerprints.i +37 -0
  58. data/Code/RubyWrappers/RingInfo.i +40 -0
  59. data/Code/RubyWrappers/Rings.i +40 -0
  60. data/Code/RubyWrappers/SanitException.i +100 -0
  61. data/Code/RubyWrappers/ScaffoldNetwork.i +28 -0
  62. data/Code/RubyWrappers/SmartsWrite.i +38 -0
  63. data/Code/RubyWrappers/SmilesParse.i +40 -0
  64. data/Code/RubyWrappers/SmilesWrite.i +42 -0
  65. data/Code/RubyWrappers/StereoGroup.i +16 -0
  66. data/Code/RubyWrappers/Streams.i +67 -0
  67. data/Code/RubyWrappers/Subgraphs.i +53 -0
  68. data/Code/RubyWrappers/Subset.i +75 -0
  69. data/Code/RubyWrappers/SubstanceGroup.i +91 -0
  70. data/Code/RubyWrappers/SubstructLibrary.i +80 -0
  71. data/Code/RubyWrappers/TautomerQuery.i +19 -0
  72. data/Code/RubyWrappers/Trajectory.i +34 -0
  73. data/Code/RubyWrappers/boost_tuple.i +64 -0
  74. data/Code/RubyWrappers/extend_std_vector.i +10 -0
  75. data/Code/RubyWrappers/gmwrapper/CMakeLists.txt +69 -0
  76. data/Code/RubyWrappers/gmwrapper/GraphMolRuby.i +431 -0
  77. data/Code/RubyWrappers/gmwrapper/std_list.i +65 -0
  78. data/Code/RubyWrappers/point.i +56 -0
  79. data/Code/RubyWrappers/transforms.i +60 -0
  80. data/Code/RubyWrappers/types.i +40 -0
  81. data/README.md +24 -0
  82. data/Rakefile +165 -4
  83. data/ext/rdkit_chem/CMakeLists.txt +69 -0
  84. data/ext/rdkit_chem/Makefile +5 -0
  85. data/ext/rdkit_chem/extconf.rb +47 -17
  86. data/lib/rdkit_chem/version.rb +2 -2
  87. data/lib/rdkit_chem.rb +31 -1
  88. data/test/test_rdkit_chem.rb +38 -10
  89. metadata +119 -13
data/CMakeLists.txt ADDED
@@ -0,0 +1,713 @@
1
+ cmake_minimum_required(VERSION 3.18)
2
+
3
+ project (RDKit)
4
+
5
+ IF(NOT CMAKE_BUILD_TYPE)
6
+ SET(CMAKE_BUILD_TYPE Release CACHE STRING
7
+ "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
8
+ FORCE)
9
+ ENDIF(NOT CMAKE_BUILD_TYPE)
10
+
11
+ # Enable CTest
12
+ include(CTest)
13
+
14
+ set(CMAKE_CXX_STANDARD 20)
15
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
16
+ set(CMAKE_C_STANDARD 99)
17
+ set(CMAKE_C_STANDARD_REQUIRED ON)
18
+
19
+ set(CMAKE_MODULE_PATH
20
+ ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/Code/cmake/Modules/")
21
+
22
+ add_library(rdkit_base INTERFACE)
23
+
24
+ option(RDK_BUILD_SWIG_WRAPPERS "build the SWIG wrappers" ON )
25
+ option(RDK_BUILD_PYTHON_WRAPPERS "build the standard python wrappers" OFF )
26
+ option(RDK_BUILD_COMPRESSED_SUPPLIERS "build in support for compressed MolSuppliers" OFF )
27
+ option(RDK_BUILD_INCHI_SUPPORT "build the rdkit inchi wrapper" OFF )
28
+ option(RDK_BUILD_AVALON_SUPPORT "install support for the avalon toolkit. Use the variable AVALONTOOLS_DIR to set the location of the source." OFF )
29
+ option(RDK_BUILD_PGSQL "build the PostgreSQL cartridge" OFF )
30
+ option(RDK_BUILD_RPATH_SUPPORT "build shared libraries using rpath" OFF)
31
+ option(RDK_PGSQL_STATIC "statically link rdkit libraries into the PostgreSQL cartridge" OFF )
32
+ option(RDK_PGSQL_BFP_GIST_SORTSUPPORT "enable the sortsupport method in the PostgreSQL bfp gist index" OFF )
33
+ option(RDK_PGSQL_MOL_GIST_SORTSUPPORT "enable the sortsupport method in the PostgreSQL mol gist index" OFF )
34
+ option(RDK_PGSQL_QMOL_GIST_SORTSUPPORT "enable the sortsupport method in the PostgreSQL qmol gist index" OFF )
35
+ option(RDK_BUILD_CONTRIB "build the Contrib directory" OFF )
36
+ option(RDK_INSTALL_INTREE "install the rdkit in the source tree (former behavior)" OFF )
37
+ option(RDK_INSTALL_DLLS_MSVC "install the rdkit DLLs when using MSVC" OFF)
38
+ option(RDK_INSTALL_STATIC_LIBS "install the rdkit static libraries" OFF )
39
+ option(RDK_INSTALL_PYTHON_TESTS "install the rdkit Python tests with the wrappers" OFF )
40
+ option(RDK_BUILD_THREADSAFE_SSS "enable thread-safe substructure searching" ON )
41
+ option(RDK_BUILD_SLN_SUPPORT "include support for the SLN format" ON )
42
+ option(RDK_TEST_MULTITHREADED "run some tests of multithreading" OFF )
43
+ option(RDK_BUILD_SWIG_JAVA_WRAPPER "build the SWIG JAVA wrappers (does nothing if RDK_BUILD_SWIG_WRAPPERS is not set)" OFF )
44
+ option(RDK_BUILD_SWIG_RUBY_WRAPPER "build the exeperimental SWIG RUBY wrappers (does nothing if RDK_BUILD_SWIG_WRAPPERS is not set)" ON )
45
+ option(RDK_BUILD_SWIG_CSHARP_WRAPPER "build the experimental SWIG C# wrappers (does nothing if RDK_BUILD_SWIG_WRAPPERS is not set)" OFF )
46
+ option(RDK_BUILD_DOTNET_CSHARP_TESTS "build the DotNet Core tests for C# wrappers on Linux (does nothing if RDK_BUILD_SWIG_CSHARP_WRAPPER is not set and is ignored on Windows)" OFF )
47
+ option(RDK_SWIG_STATIC "statically link rdkit libraries into the SWIG wrappers" OFF )
48
+ option(RDK_TEST_MMFF_COMPLIANCE "run MMFF compliance tests (requires tar/gzip)" OFF )
49
+ option(RDK_BUILD_CPP_TESTS "build the c++ tests (disabing can speed up builds" OFF)
50
+ option(RDK_USE_FLEXBISON "use flex/bison, if available, to build the SMILES/SMARTS/SLN parsers" OFF)
51
+ option(RDK_TEST_COVERAGE "Use G(L)COV to compute test coverage" OFF)
52
+ option(RDK_USE_BOOST_SERIALIZATION "Use the boost serialization library if available" ON)
53
+ option(RDK_USE_BOOST_STACKTRACE "use boost::stacktrace to do more verbose invariant output (linux only)" ON)
54
+ option(RDK_BUILD_TEST_GZIP "Build the gzip'd stream test" OFF)
55
+ option(RDK_OPTIMIZE_POPCNT "Use SSE4.2 popcount instruction while compiling." ON)
56
+ option(RDK_USE_STRICT_ROTOR_DEFINITION "Use the most strict rotatable bond definition" ON)
57
+ option(RDK_BUILD_DESCRIPTORS3D "Build the 3D descriptors calculators, requires Eigen3 to be installed" OFF)
58
+ option(RDK_BUILD_CHEMDRAW_SUPPORT "build support for the Revvity ChemDraw document format" ON )
59
+ option(RDK_BUILD_FREESASA_SUPPORT "build the rdkit freesasa wrapper" OFF )
60
+ option(RDK_BUILD_COORDGEN_SUPPORT "build the rdkit coordgen wrapper" ON )
61
+ option(RDK_BUILD_MAEPARSER_SUPPORT "build the rdkit MAE parser wrapper" ON )
62
+ option(RDK_BUILD_MOLINTERCHANGE_SUPPORT "build in support for CommonChem molecule interchange" ON )
63
+ option(RDK_BUILD_YAEHMOP_SUPPORT "build support for the YAeHMOP wrapper" OFF)
64
+ option(RDK_BUILD_XYZ2MOL_SUPPORT "build in support for the RDKit's implementation of xyz2mol (in the DetermineBonds library)" OFF )
65
+ option(RDK_BUILD_STRUCTCHECKER_SUPPORT "build in support for the StructChecker alpha (not recommended, use the MolVS integration instead)" OFF )
66
+ option(RDK_BUILD_PUBCHEMSHAPE_SUPPORT "build the rdkit wrapper around pubchem-align3d" ON )
67
+ option(RDK_USE_URF "Build support for Florian Flachsenberg's URF library" ON)
68
+ option(RDK_INSTALL_DEV_COMPONENT "install libraries and headers" ON)
69
+ option(RDK_USE_BOOST_IOSTREAMS "use boost::iostreams" ON)
70
+ option(RDK_BUILD_MINIMAL_LIB "build the minimal RDKit wrapper (for the JS bindings)" OFF)
71
+ option(RDK_MINIMAL_LIB_SUPPORT_LEGACY_BROWSERS "build the minimal RDKit JS wrapper such that it supports legacy browsers" OFF)
72
+ option(RDK_BUILD_CFFI_LIB "build the CFFI wrapper (for use in other programming languges)" OFF)
73
+ option(RDK_CFFI_STATIC "statically link rdkit libraries into the cffi wrapper" ON)
74
+ option(RDK_BUILD_FUZZ_TARGETS "build the fuzz targets" OFF)
75
+ option(RDK_BUILD_MINIMAL_LIB_RXN "build support for reactions into MinimalLib" ON )
76
+ option(RDK_BUILD_MINIMAL_LIB_SUBSTRUCTLIBRARY "build support for SubstructLibrary into MinimalLib" ON )
77
+ option(RDK_BUILD_MINIMAL_LIB_MCS "build support for MCS into MinimalLib" OFF )
78
+ option(RDK_BUILD_MINIMAL_LIB_MOLZIP "build support for molzip into MinimalLib" OFF )
79
+ option(RDK_BUILD_LONG_RUNNING_TESTS "build longer running tests" OFF )
80
+
81
+ set(RDK_BOOST_VERSION "1.81.0")
82
+
83
+ if(NOT MSVC)
84
+ if(RDK_OPTIMIZE_POPCNT)
85
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)")
86
+ message("RDK_OPTIMIZE_POPCNT is not available on aarch64 or arm64")
87
+ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(ppc64|powerpc64)")
88
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcntd")
89
+ else()
90
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mpopcnt")
91
+ endif()
92
+ endif()
93
+ endif()
94
+
95
+ # Detect clang, which masquerades as gcc. CMake 2.6 doesn't know how to
96
+ # detect it.
97
+ string(REGEX MATCH "clang" CMAKE_COMPILER_IS_CLANG "${CMAKE_C_COMPILER}")
98
+ # Detect emcc
99
+ string(REGEX MATCH "Emscripten" CMAKE_COMPILER_IS_EMCC "${CMAKE_SYSTEM_NAME}")
100
+
101
+ if(NOT UNIX OR APPLE OR CYGWIN OR CMAKE_COMPILER_IS_EMCC)
102
+ if(RDK_USE_BOOST_STACKTRACE)
103
+ MESSAGE("Disabling boost::stacktrace on non-linux and emscripten platforms")
104
+ set(RDK_USE_BOOST_STACKTRACE OFF)
105
+ endif(RDK_USE_BOOST_STACKTRACE)
106
+ endif()
107
+
108
+ if(NOT RDK_BUILD_SWIG_WRAPPERS)
109
+ set(RDK_BUILD_SWIG_JAVA_WRAPPER OFF)
110
+ set(RDK_BUILD_SWIG_CSHARP_WRAPPER OFF)
111
+ set(RDK_BUILD_SWIG_RUBY_WRAPPER OFF)
112
+ endif()
113
+
114
+ if(RDK_SWIG_STATIC AND RDK_BUILD_SWIG_WRAPPERS)
115
+ if(NOT MSVC AND NOT RDK_INSTALL_STATIC_LIBS)
116
+ message("Enabling RDK_INSTALL_STATIC_LIBS because RDK_SWIG_STATIC is set.")
117
+ set(RDK_INSTALL_STATIC_LIBS ON CACHE BOOL "install the rdkit static libraries" FORCE)
118
+ endif(NOT MSVC AND NOT RDK_INSTALL_STATIC_LIBS)
119
+ endif()
120
+ if ((MSVC AND (NOT RDK_INSTALL_DLLS_MSVC)) OR (WIN32 AND RDK_INSTALL_STATIC_LIBS) OR RDK_BUILD_MINIMAL_LIB)
121
+ set(RDK_BUILD_STATIC_LIBS_ONLY ON)
122
+ else()
123
+ set(RDK_BUILD_STATIC_LIBS_ONLY OFF)
124
+ endif()
125
+ if(NOT RDK_BUILD_STATIC_LIBS_ONLY)
126
+ add_definitions(-DRDKIT_DYN_LINK)
127
+ endif()
128
+
129
+ if(RDK_PGSQL_STATIC AND RDK_BUILD_PGSQL)
130
+ if(NOT MSVC AND NOT RDK_INSTALL_STATIC_LIBS)
131
+ message("Enabling RDK_INSTALL_STATIC_LIBS because RDK_PGSQL_STATIC is set.")
132
+ set(RDK_INSTALL_STATIC_LIBS ON CACHE BOOL "install the rdkit static libraries" FORCE)
133
+ endif(NOT MSVC AND NOT RDK_INSTALL_STATIC_LIBS)
134
+ endif()
135
+
136
+ if(RDK_CFFI_STATIC AND RDK_BUILD_CFFI_LIB)
137
+ if(NOT MSVC AND NOT RDK_INSTALL_STATIC_LIBS)
138
+ message("Enabling RDK_INSTALL_STATIC_LIBS because RDK_CFFI_STATIC is set.")
139
+ set(RDK_INSTALL_STATIC_LIBS ON CACHE BOOL "install the rdkit static libraries" FORCE)
140
+ endif(NOT MSVC AND NOT RDK_INSTALL_STATIC_LIBS)
141
+ endif()
142
+
143
+
144
+ include(TestBigEndian)
145
+ TEST_BIG_ENDIAN(RDK_BIG_ENDIAN)
146
+
147
+ # At build time put runtime binaries in the bin subdirectory
148
+ set(RDK_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin")
149
+ set(RDK_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
150
+ set(RDK_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib")
151
+ # Also place the python extension where the source tree would expect them
152
+ set(RDK_PYTHON_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/rdkit")
153
+
154
+ #-------
155
+ # Config variables:
156
+ set(RDKit_Year "2026")
157
+ set(RDKit_Month "03")
158
+ set(RDKit_Revision "1")
159
+ set(RDKit_RevisionModifier "pre")
160
+ set(RDKit_ABI "1")
161
+
162
+ # we need an integer version of the month later, so remove the zero padding
163
+ # if there is any
164
+ string(REGEX REPLACE "^0" "" RDKit_intMonth ${RDKit_Month} )
165
+
166
+ set(RDKit_CodeDir "${CMAKE_CURRENT_SOURCE_DIR}/Code")
167
+ set(RDKit_ExternalDir "${CMAKE_CURRENT_SOURCE_DIR}/External")
168
+ set(RDKit_DataDir "${CMAKE_CURRENT_SOURCE_DIR}/Data")
169
+
170
+ #include catch
171
+ find_package(Catch2 3 QUIET)
172
+ if(NOT Catch2_FOUND)
173
+ Include(FetchContent)
174
+
175
+ FetchContent_Declare(
176
+ Catch2
177
+ GIT_REPOSITORY https://github.com/catchorg/Catch2.git
178
+ GIT_TAG v3.4.0 # or a later release
179
+ )
180
+
181
+ FetchContent_MakeAvailable(Catch2)
182
+ endif()
183
+
184
+ # make sure we have better_enums
185
+ Include(FetchContent)
186
+
187
+ FetchContent_Declare(
188
+ better_enums
189
+ GIT_REPOSITORY https://github.com/aantron/better-enums.git
190
+ GIT_TAG c35576bed0295689540b39873126129adfa0b4c8 # 0.11.3
191
+ )
192
+
193
+ if(RDK_INSTALL_INTREE)
194
+ set(RDKit_BinDir "${CMAKE_SOURCE_DIR}/bin")
195
+ set(RDKit_LibDir "${CMAKE_SOURCE_DIR}/lib")
196
+ set(RDKit_HdrDir "Code") # used in rdkit-config.cmake, path prefix not needed.
197
+ set(RDKit_ShareDir "${CMAKE_SOURCE_DIR}")
198
+ else(RDK_INSTALL_INTREE)
199
+ set(RDKit_BinDir "bin")
200
+ set(RDKit_LibDir "lib${LIB_SUFFIX}")
201
+ set(RDKit_HdrDir "include/rdkit")
202
+ set(RDKit_ShareDir "share/RDKit")
203
+ endif(RDK_INSTALL_INTREE)
204
+
205
+ if(RDK_BUILD_RPATH_SUPPORT)
206
+ # use, i.e. don't skip the full RPATH for the build tree
207
+ SET(CMAKE_SKIP_BUILD_RPATH FALSE)
208
+
209
+ # when building, don't use the install RPATH already
210
+ # (but later on when installing)
211
+ SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
212
+
213
+ message("CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_PREFIX}/lib")
214
+ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
215
+
216
+ # add the automatically determined parts of the RPATH
217
+ # which point to directories outside the build tree to the install RPATH
218
+ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
219
+
220
+ # the RPATH to be used when installing, but only if it's not a system
221
+ # directory
222
+ LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
223
+ "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
224
+ IF("${isSystemDir}" STREQUAL "-1")
225
+ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
226
+ ENDIF("${isSystemDir}" STREQUAL "-1")
227
+ endif()
228
+
229
+ if(RDK_BUILD_SWIG_RUBY_WRAPPERS)
230
+ set(RDKit_RubyLibDir "${RDKit_ExternalDir}/ruby_lib")
231
+ endif(RDK_BUILD_SWIG_RUBY_WRAPPERS)
232
+
233
+ if(RDK_BUILD_COORDGEN_SUPPORT)
234
+ add_definitions(-DRDK_BUILD_COORDGEN_SUPPORT)
235
+ include_directories(${RDKit_ExternalDir})
236
+ endif()
237
+
238
+ if(RDK_BUILD_MAEPARSER_SUPPORT)
239
+ add_definitions(-DRDK_BUILD_MAEPARSER_SUPPORT)
240
+ include_directories(${RDKit_ExternalDir})
241
+ endif()
242
+
243
+ if(RDK_USE_URF)
244
+ add_definitions(-DRDK_USE_URF)
245
+ if((MSVC AND (NOT RDK_INSTALL_DLLS_MSVC)) OR ((NOT MSVC) AND WIN32 AND RDK_INSTALL_STATIC_LIBS))
246
+ add_definitions(-DRDL_WIN_STATIC)
247
+ endif()
248
+ include_directories(${RDKit_ExternalDir}/RingFamilies/RingDecomposerLib/src/RingDecomposerLib)
249
+ endif()
250
+
251
+ if(RDK_BUILD_XYZ2MOL_SUPPORT)
252
+ add_definitions(-DRDK_BUILD_XYZ2MOL_SUPPORT)
253
+ include_directories(${RDKit_ExternalDir})
254
+ endif()
255
+
256
+ if(RDK_BUILD_YAEHMOP_SUPPORT)
257
+ add_definitions(-DRDK_BUILD_YAEHMOP_SUPPORT)
258
+ endif()
259
+
260
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
261
+ target_compile_definitions(rdkit_base INTERFACE "-DRDK_32BIT_BUILD")
262
+ else()
263
+ target_compile_definitions(rdkit_base INTERFACE "-DRDK_64BIT_BUILD")
264
+ endif()
265
+
266
+ if(MINGW)
267
+ target_compile_definitions(rdkit_base INTERFACE "-DBOOST_SYSTEM_NO_DEPRECATED")
268
+ endif(MINGW)
269
+ # fallback on match to "Clang" where CMAKE_C_COMPILER=/usr/bin/cc
270
+ if (CMAKE_COMPILER_IS_CLANG OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_COMPILER_IS_EMCC)
271
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15)
272
+ target_compile_definitions(rdkit_base INTERFACE -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_NO_CXX98_FUNCTION_BASE -D_HAS_AUTO_PTR_ETC=0)
273
+ target_compile_options(rdkit_base INTERFACE -Wno-deprecated-builtins -Wno-deprecated-non-prototype -Wno-unused-parameter)
274
+ endif()
275
+ endif()
276
+
277
+ # defines macros: rdkit_python_extension, rdkit_test
278
+ include(RDKitUtils)
279
+
280
+ install(TARGETS rdkit_base EXPORT ${RDKit_EXPORTED_TARGETS}
281
+ COMPONENT dev )
282
+
283
+ # disable some warnings that we don't care about
284
+ if(MSVC)
285
+ # These should occasionally be enabled to check what's going on
286
+ # 4267 conversion with possible loss of data.
287
+ # 4305 truncation from 'double' to 'const float'
288
+ # 4244 conversion from 'uint64_t' to 'unsigned int', possible loss of data
289
+ target_compile_options(rdkit_base INTERFACE "/wd4267" "/wd4305" "/wd4244")
290
+ target_compile_definitions(rdkit_base INTERFACE "_CRT_SECURE_NO_WARNINGS")
291
+ endif(MSVC)
292
+
293
+
294
+ # extra boost versions
295
+ if(MSVC)
296
+ # FIX: do we still need this?
297
+ target_compile_definitions(rdkit_base INTERFACE "-DBOOST_ALL_NO_LIB")
298
+ if(RDK_INSTALL_DLLS_MSVC)
299
+ target_compile_definitions(rdkit_base INTERFACE "-DBOOST_ALL_DYN_LINK")
300
+ endif(RDK_INSTALL_DLLS_MSVC)
301
+ endif(MSVC)
302
+
303
+ if(RDK_BUILD_INCHI_SUPPORT)
304
+ find_package(Inchi)
305
+ endif(RDK_BUILD_INCHI_SUPPORT)
306
+
307
+ if(RDK_BUILD_PYTHON_WRAPPERS)
308
+ add_library(rdkit_py_base INTERFACE)
309
+
310
+ #-------
311
+ # pull in python:
312
+ find_package(Python3 COMPONENTS Interpreter Development.Module NumPy)
313
+ target_include_directories(rdkit_py_base INTERFACE ${Python3_INCLUDE_DIRS})
314
+ target_include_directories(rdkit_py_base INTERFACE ${Python3_NumPy_INCLUDE_DIRS})
315
+
316
+ # determine linkage of python
317
+ execute_process(
318
+ COMMAND
319
+ ${Python3_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var('Py_ENABLE_SHARED'))"
320
+ OUTPUT_VARIABLE Py_ENABLE_SHARED
321
+ OUTPUT_STRIP_TRAILING_WHITESPACE
322
+ )
323
+
324
+ if(WIN32 OR "${Py_ENABLE_SHARED}" STREQUAL "1")
325
+ target_link_libraries(rdkit_py_base INTERFACE ${Python3_LIBRARIES} )
326
+ endif()
327
+
328
+
329
+ find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS "python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}" "numpy${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}" REQUIRED CONFIG)
330
+
331
+ target_link_libraries(rdkit_py_base INTERFACE "Boost::python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}" "Boost::numpy${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
332
+
333
+ if(RDK_INSTALL_INTREE)
334
+ set(RDKit_PythonDir "${CMAKE_SOURCE_DIR}/rdkit")
335
+ else(RDK_INSTALL_INTREE)
336
+ if (NOT PYTHON_INSTDIR)
337
+ # Determine correct installation directory for Python bindings
338
+ execute_process(
339
+ COMMAND
340
+ ${Python3_EXECUTABLE} -c "import sys; import sysconfig; \
341
+ base_key = 'base' if sys.platform == 'win32' else 'platbase'; \
342
+ schema = 'nt' if sys.platform == 'win32' else 'posix_prefix'; \
343
+ print(sysconfig.get_path('platlib', schema, vars={base_key: '${CMAKE_INSTALL_PREFIX}'}))"
344
+ OUTPUT_VARIABLE PYTHON_INSTDIR
345
+ OUTPUT_STRIP_TRAILING_WHITESPACE
346
+ )
347
+ endif (NOT PYTHON_INSTDIR)
348
+ string(REGEX REPLACE "\\\\" "/" PYTHON_INSTDIR ${PYTHON_INSTDIR})
349
+ message("Python Install directory ${PYTHON_INSTDIR}")
350
+ set(RDKit_PythonDir "${PYTHON_INSTDIR}/rdkit")
351
+ if(RDK_INSTALL_PYTHON_TESTS)
352
+ install(DIRECTORY rdkit DESTINATION ${PYTHON_INSTDIR}
353
+ COMPONENT python
354
+ PATTERN ".svn" EXCLUDE
355
+ PATTERN "CMake*" EXCLUDE
356
+ PATTERN "Basement" EXCLUDE
357
+ )
358
+ else(RDK_INSTALL_PYTHON_TESTS)
359
+ install(DIRECTORY rdkit DESTINATION ${PYTHON_INSTDIR}
360
+ COMPONENT python
361
+ PATTERN ".svn" EXCLUDE
362
+ PATTERN "test_data" EXCLUDE
363
+ PATTERN "testData" EXCLUDE
364
+ PATTERN "test_list*" EXCLUDE
365
+ PATTERN "CMake*" EXCLUDE
366
+ PATTERN "Basement" EXCLUDE
367
+ PATTERN "UnitTest*" EXCLUDE
368
+ )
369
+ endif(RDK_INSTALL_PYTHON_TESTS)
370
+
371
+ endif(RDK_INSTALL_INTREE)
372
+
373
+ if(NOT WIN32)
374
+ # See https://bugs.python.org/msg277944
375
+ # The "command to create shared modules". Used as variable in the "Makefile (and similar) templates to build python modules"
376
+ # for both in-python and third party modules. Initialized to hold the value which works for third party modules to link
377
+ # against the _installed_ python.
378
+ # We strip off the first word though (which will be the compiler name).
379
+ execute_process(
380
+ COMMAND
381
+ ${Python3_EXECUTABLE} -c "import sysconfig; print(sysconfig.get_config_var('LDSHARED').lstrip().split(' ', 1)[1])"
382
+ OUTPUT_VARIABLE PYTHON_LDSHARED
383
+ OUTPUT_STRIP_TRAILING_WHITESPACE
384
+ )
385
+ endif()
386
+
387
+
388
+ install(TARGETS rdkit_py_base EXPORT ${RDKitPython_EXPORTED_TARGETS}
389
+ COMPONENT dev )
390
+
391
+ # check to see if we can find nbval,
392
+ execute_process(
393
+ COMMAND
394
+ ${Python3_EXECUTABLE} -c "import nbval"
395
+ ERROR_VARIABLE nbvalERR
396
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
397
+ if(NOT nbvalERR)
398
+ set(RDK_NBVAL_AVAILABLE ON)
399
+ else()
400
+ message("nbval not found, disabling the jupyter tests")
401
+ endif()
402
+
403
+ else(RDK_BUILD_PYTHON_WRAPPERS)
404
+ find_package(Boost ${RDK_BOOST_VERSION} REQUIRED CONFIG)
405
+ endif(RDK_BUILD_PYTHON_WRAPPERS)
406
+
407
+ find_package(Eigen3)
408
+ if(RDK_BUILD_DESCRIPTORS3D)
409
+ if(NOT EIGEN3_FOUND)
410
+ add_subdirectory(External/Eigen)
411
+ endif()
412
+ target_compile_definitions(rdkit_base INTERFACE "-DRDK_BUILD_DESCRIPTORS3D")
413
+ endif()
414
+
415
+ if(TARGET Eigen3::Eigen)
416
+ target_compile_definitions(rdkit_base INTERFACE "-DRDK_HAS_EIGEN3")
417
+ target_link_libraries(rdkit_base INTERFACE Eigen3::Eigen)
418
+ set(RDK_HAS_EIGEN ON)
419
+ endif()
420
+
421
+ if(RDK_BUILD_THREADSAFE_SSS)
422
+ find_package (Threads)
423
+ set(RDKit_THREAD_LIBS Threads::Threads)
424
+ target_compile_definitions(rdkit_base INTERFACE -DRDK_BUILD_THREADSAFE_SSS)
425
+ if(RDK_TEST_MULTITHREADED)
426
+ target_compile_definitions(rdkit_base INTERFACE "-DRDK_TEST_MULTITHREADED")
427
+ endif()
428
+ target_link_libraries(rdkit_base INTERFACE Threads::Threads)
429
+ else()
430
+ # otherwise boost flyweight links against pthreads and causes the
431
+ # RDK_BUILD_THREADSAFE_SSS=OFF build to fail
432
+ target_compile_definitions(rdkit_base INTERFACE "-DBOOST_DISABLE_THREADS")
433
+ if(RDK_TEST_MULTITHREADED)
434
+ message("RDK_TEST_MULTITHREADED does not make sense without RDK_BUILD_THREADSAFE_SSS, disabling it.")
435
+ set(RDK_TEST_MULTITHREADED OFF)
436
+ endif()
437
+ endif()
438
+
439
+ if(RDK_USE_BOOST_SERIALIZATION)
440
+ find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS serialization iostreams REQUIRED CONFIG)
441
+ target_link_libraries(rdkit_base INTERFACE ${Boost_LIBRARIES})
442
+ target_compile_definitions(rdkit_base INTERFACE -DRDK_USE_BOOST_SERIALIZATION)
443
+ if(NOT Boost_USE_STATIC_LIBS)
444
+ target_compile_definitions(rdkit_base INTERFACE -DBOOST_SERIALIZATION_DYN_LINK)
445
+ endif()
446
+ endif()
447
+
448
+ if(RDK_USE_BOOST_IOSTREAMS)
449
+ target_compile_definitions(rdkit_base INTERFACE -DRDK_USE_BOOST_IOSTREAMS)
450
+ find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS iostreams REQUIRED CONFIG)
451
+ target_link_libraries(rdkit_base INTERFACE ${Boost_LIBRARIES})
452
+
453
+ if (NOT Boost_USE_STATIC_LIBS)
454
+ target_compile_definitions(rdkit_base INTERFACE -DBOOST_IOSTREAMS_DYN_LINK)
455
+ endif()
456
+
457
+ # deal with zlib
458
+ if (WIN32)
459
+ find_package(Boost ${RDK_BOOST_VERSION} COMPONENTS zlib CONFIG)
460
+ if(Boost_zlib_FOUND)
461
+ set(zlib_lib Boost::zlib)
462
+ endif()
463
+ else()
464
+ if(Boost_USE_STATIC_LIBS)
465
+ # when we're doing static linkage of boost
466
+ # to also link against zlib (due to iostreams)
467
+ find_package(ZLIB)
468
+ set(zlib_lib ${ZLIB_LIBRARIES})
469
+ endif()
470
+ endif()
471
+ target_link_libraries(rdkit_base INTERFACE ${zlib_lib})
472
+ endif()
473
+
474
+
475
+ # set the boost include directories and linkage:
476
+ target_include_directories(rdkit_base INTERFACE
477
+ $<BUILD_INTERFACE:${RDKit_CodeDir}>
478
+ $<INSTALL_INTERFACE:${RDKit_HdrDir}>
479
+ )
480
+ # linking against Boost::boost will add Boost to the include directories without
481
+ # hard-coding Boost's path into the rdkit-targets.cmake that gets generated
482
+ target_link_libraries(rdkit_base INTERFACE ${BOOST_LIBRARIES} Boost::boost)
483
+
484
+
485
+ if(RDK_BUILD_PGSQL)
486
+ find_package(PostgreSQL REQUIRED)
487
+ endif(RDK_BUILD_PGSQL)
488
+
489
+ # setup our compiler flags:
490
+ if (RDK_TEST_COVERAGE)
491
+ if (NOT RDK_USE_FLEXBISON)
492
+ message(FATAL_ERROR, "Test coverage doesn't current work unless FLEX and BISON are run.")
493
+ endif(NOT RDK_USE_FLEXBISON)
494
+
495
+ message("====== Installing test coverage support ======")
496
+ message(" To run:")
497
+ message(" make install")
498
+ message(" make RDKit_coverage")
499
+ message("")
500
+ message(" open <build_dir>/coverage/index.html")
501
+ message("")
502
+ message(" If any of the RDKit tests fail, coverage will probably not be generated.")
503
+ message("====== Installing test coverage support ======")
504
+ message("")
505
+
506
+ INCLUDE(CodeCoverage)
507
+ SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
508
+ SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
509
+ message("== setup_target_for_coverage(${PROJECT_NAME}_coverage test coverage)")
510
+ setup_target_for_coverage(${PROJECT_NAME}_coverage ctest coverage)
511
+
512
+ else(RDK_TEST_COVERAGE)
513
+ if(CMAKE_COMPILER_IS_GNUCXX)
514
+ # We don't on C_FLAGS warnings to keep Avalon compiling quiet
515
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-deprecated -Wno-unused-function -fno-strict-aliasing")
516
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -Wall -Wextra")
517
+ if (NOT CYGWIN)
518
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
519
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
520
+ endif()
521
+ endif()
522
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") # there's at least Clang and AppleClang
523
+ # We don't on C_FLAGS warnings to keep Avalon compiling quiet
524
+ SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-array-bounds -fPIC -Wno-parentheses -Wno-logical-op-parentheses -Wno-format")
525
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-deprecated -Wno-unused-function -fno-strict-aliasing -Wno-format -Wno-logical-op-parentheses -fPIC")
526
+ if(APPLE)
527
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
528
+ endif()
529
+ endif()
530
+ endif(RDK_TEST_COVERAGE)
531
+
532
+ if(NOT RDK_INSTALL_INTREE)
533
+ install(DIRECTORY Data DESTINATION
534
+ ${RDKit_ShareDir}
535
+ COMPONENT data
536
+ PATTERN ".svn" EXCLUDE
537
+ )
538
+ install(DIRECTORY Docs DESTINATION
539
+ ${RDKit_ShareDir}
540
+ COMPONENT docs
541
+ PATTERN ".svn" EXCLUDE
542
+ PATTERN "_build" EXCLUDE
543
+ )
544
+ install(DIRECTORY Contrib DESTINATION
545
+ ${RDKit_ShareDir}
546
+ COMPONENT extras
547
+ PATTERN ".svn" EXCLUDE
548
+ )
549
+ if(RDK_BUILD_PYTHON_WRAPPERS)
550
+ install(DIRECTORY Projects DESTINATION
551
+ ${RDKit_ShareDir}
552
+ COMPONENT extras
553
+ PATTERN ".svn" EXCLUDE
554
+ PATTERN "test_list*" EXCLUDE
555
+ PATTERN "CMake*" EXCLUDE
556
+ )
557
+ if(RDK_INSTALL_PYTHON_TESTS)
558
+ install(DIRECTORY Scripts DESTINATION
559
+ ${RDKit_ShareDir}
560
+ COMPONENT data
561
+ PATTERN ".svn" EXCLUDE
562
+ )
563
+ else(RDK_INSTALL_PYTHON_TESTS)
564
+ install(DIRECTORY Scripts DESTINATION
565
+ ${RDKit_ShareDir}
566
+ COMPONENT data
567
+ PATTERN ".svn" EXCLUDE
568
+ PATTERN "run_python_tests.py" EXCLUDE
569
+ )
570
+ endif(RDK_INSTALL_PYTHON_TESTS)
571
+
572
+
573
+ endif(RDK_BUILD_PYTHON_WRAPPERS)
574
+ install(FILES README.md license.txt
575
+ DESTINATION ${RDKit_ShareDir}
576
+ COMPONENT base
577
+ )
578
+ endif(NOT RDK_INSTALL_INTREE)
579
+
580
+ if (RDK_SQUASH_MVC_SECURE_WARNINGS)
581
+ MESSAGE("== Squashing MSVC Security warnings (do not use during development)")
582
+ target_compile_definitions(rdkit_base INTERFACE "-D_SCL_SECURE_NO_WARNINGS")
583
+ target_compile_definitions(rdkit_base INTERFACE "/wd4996")
584
+ endif(RDK_SQUASH_MVC_SECURE_WARNINGS)
585
+
586
+ if(RDK_USE_STRICT_ROTOR_DEFINITION)
587
+ MESSAGE("== Using strict rotor definition")
588
+ target_compile_definitions(rdkit_base INTERFACE "-DRDK_USE_STRICT_ROTOR_DEFINITION")
589
+ endif()
590
+
591
+ if (MSVC)
592
+ # disable warnings:
593
+ # - 4267: conversion from 'size_t' to 'unsigned int', possible loss of data
594
+ add_definitions( "/wd4267" )
595
+ endif(MSVC)
596
+
597
+ add_subdirectory(External)
598
+ add_subdirectory(Code)
599
+
600
+ if(RDK_BUILD_PYTHON_WRAPPERS)
601
+ add_subdirectory(Projects)
602
+ add_subdirectory(rdkit)
603
+ add_subdirectory(rdkit-stubs)
604
+ endif(RDK_BUILD_PYTHON_WRAPPERS)
605
+
606
+ if(RDK_BUILD_CONTRIB)
607
+ add_subdirectory(Contrib)
608
+ endif(RDK_BUILD_CONTRIB)
609
+
610
+ # export the project targets (to be included in the cmake package configuration)
611
+ include(CMakePackageConfigHelpers)
612
+
613
+ # first manage the targets for the base C++ toolkit
614
+ install(
615
+ EXPORT ${RDKit_EXPORTED_TARGETS}
616
+ FILE ${RDKit_EXPORTED_TARGETS}.cmake
617
+ NAMESPACE RDKit::
618
+ DESTINATION ${RDKit_LibDir}/cmake/rdkit
619
+ )
620
+
621
+ # create and install package configuration and version files
622
+ write_basic_package_version_file(
623
+ "${RDKit_BINARY_DIR}/rdkit-config-version.cmake"
624
+ VERSION ${RDKit_RELEASENAME}
625
+ COMPATIBILITY AnyNewerVersion
626
+ )
627
+
628
+ configure_file (
629
+ ${RDKit_SOURCE_DIR}/rdkit-config.cmake.in
630
+ ${RDKit_BINARY_DIR}/rdkit-config.cmake @ONLY)
631
+
632
+ install(FILES
633
+ ${RDKit_BINARY_DIR}/rdkit-config.cmake
634
+ ${RDKit_BINARY_DIR}/rdkit-config-version.cmake
635
+ DESTINATION ${RDKit_LibDir}/cmake/rdkit)
636
+
637
+ # then manage the targets for the python bindings
638
+ if(RDK_BUILD_PYTHON_WRAPPERS)
639
+ install(
640
+ EXPORT ${RDKitPython_EXPORTED_TARGETS}
641
+ FILE ${RDKitPython_EXPORTED_TARGETS}.cmake
642
+ NAMESPACE RDKit::
643
+ DESTINATION ${RDKit_LibDir}/cmake/rdkitpython
644
+ )
645
+
646
+ write_basic_package_version_file(
647
+ "${RDKit_BINARY_DIR}/rdkitpython-config-version.cmake"
648
+ VERSION ${RDKit_RELEASENAME}
649
+ COMPATIBILITY AnyNewerVersion
650
+ )
651
+
652
+ configure_file (
653
+ ${RDKit_SOURCE_DIR}/rdkitpython-config.cmake.in
654
+ ${RDKit_BINARY_DIR}/rdkitpython-config.cmake @ONLY)
655
+
656
+ install(FILES
657
+ ${RDKit_BINARY_DIR}/rdkitpython-config.cmake
658
+ ${RDKit_BINARY_DIR}/rdkitpython-config-version.cmake
659
+ DESTINATION ${RDKit_LibDir}/cmake/rdkitpython)
660
+ endif(RDK_BUILD_PYTHON_WRAPPERS)
661
+
662
+ # Memory testing setup
663
+ FIND_PROGRAM(MEMORYCHECK_COMMAND valgrind)
664
+ CONFIGURE_FILE(CTestCustom.ctest.in ${RDKit_BINARY_DIR}/CTestCustom.ctest)
665
+
666
+ # Packaging
667
+ SET(CPACK_GENERATOR "TGZ;DEB;RPM")
668
+ SET(CPACK_RPM_COMPONENT_INSTALL ON)
669
+ SET(CPACK_DEB_COMPONENT_INSTALL ON)
670
+ SET(CPACK_MONOLITHIC_INSTALL OFF)
671
+
672
+ SET(CPACK_COMPONENTS_ALL runtime base data docs dev python extras)
673
+ set(CPACK_COMPONENT_RUNTIME_GROUP "Runtime")
674
+ set(CPACK_COMPONENT_BASE_GROUP "Runtime")
675
+ set(CPACK_COMPONENT_DATA_GROUP "Runtime")
676
+ set(CPACK_COMPONENT_DOCS_GROUP "Runtime")
677
+ set(CPACK_COMPONENT_DEV_GROUP "Development")
678
+ set(CPACK_COMPONENT_PYTHON_GROUP "Python")
679
+ set(CPACK_COMPONENT_EXTRAS_GROUP "Extras")
680
+ if(RDK_BUILD_PGSQL)
681
+ SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} pgsql)
682
+ set(CPACK_COMPONENT_PGSQL_GROUP "PgSQL")
683
+ endif()
684
+
685
+ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "RDKit")
686
+ SET(CPACK_PACKAGE_VENDOR "rdkit.org")
687
+ SET(CPACK_PACKAGE_CONTACT "greg.landrum@gmail.com")
688
+ SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
689
+ SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.txt")
690
+ SET(CPACK_PACKAGE_VERSION_MAJOR ${RDKit_Year})
691
+ SET(CPACK_PACKAGE_VERSION_MINOR ${RDKit_Month})
692
+ SET(CPACK_PACKAGE_VERSION_PATCH ${RDKit_Revision}${RDKit_RevisionModifier})
693
+ SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
694
+ #IF(WIN32 AND NOT UNIX)
695
+ # # There is a bug in NSI that does not handle full unix paths properly. Make
696
+ # # sure there is at least one set of four (4) backlasshes.
697
+ # SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
698
+ # SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe")
699
+ # SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} My Famous Project")
700
+ # SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.my-project-home-page.org")
701
+ # SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.my-personal-home-page.com")
702
+ # SET(CPACK_NSIS_CONTACT "me@my-personal-home-page.com")
703
+ # SET(CPACK_NSIS_MODIFY_PATH ON)
704
+ #ELSE(WIN32 AND NOT UNIX)
705
+ # SET(CPACK_STRIP_FILES "bin/MyExecutable")
706
+ # SET(CPACK_SOURCE_STRIP_FILES "")
707
+ #ENDIF(WIN32 AND NOT UNIX)
708
+ #SET(CPACK_PACKAGE_EXECUTABLES "MyExecutable" "My Executable")
709
+
710
+
711
+ SET(CPACK_SET_DESTDIR ON)
712
+
713
+ INCLUDE(CPack)