Debian Codegraph @

avogadro/qtplugins/insertfragment/CMakeLists.txt

raw
1 include(ExternalProject)
2
3 avogadro_plugin(InsertFragment
4 "Insert molecular fragments and crystals."
5 ExtensionPlugin
6 insertfragment.h
7 InsertFragment
8 insertfragment.cpp
9 )
10
11 # Install the fragments & crystals
12 # TODO - make this a for loop
13 set(_molecules "${AvogadroLibs_SOURCEDATA_DIR}/molecules")
14 set(_crystals "${AvogadroLibs_SOURCEDATA_DIR}/crystals")
15
16 # Look in parallel directory for the molecule fragment repository
17 if(NOT EXISTS "${_molecules}")
18 # download molecules...
19 ExternalProject_Add(molecules
20 GIT_REPOSITORY https://github.com/openchemistry/molecules
21 # or https://github.com/OpenChemistry/molecules/archive/refs/heads/master.zip
22 SOURCE_DIR "${AvogadroLibs_SOURCEDATA_DIR}/molecules"
23 CONFIGURE_COMMAND ""
24 BUILD_COMMAND ""
25 INSTALL_COMMAND ""
26 )
27 endif()
28
29 install(DIRECTORY "${AvogadroLibs_SOURCEDATA_DIR}/molecules"
30 DESTINATION "${INSTALL_DATA_DIR}/avogadro2"
31 PATTERN ".git" EXCLUDE
32 )
33
34 # crystals
35 if(NOT EXISTS "${_crystals}")
36 # download molecules...
37 ExternalProject_Add(crystals
38 GIT_REPOSITORY https://github.com/openchemistry/crystals
39 # or https://github.com/OpenChemistry/crystals/archive/refs/heads/master.zip
40 SOURCE_DIR "${AvogadroLibs_SOURCEDATA_DIR}/crystals"
41 CONFIGURE_COMMAND ""
42 BUILD_COMMAND ""
43 INSTALL_COMMAND ""
44 )
45 endif()
46
47 install(DIRECTORY "${AvogadroLibs_SOURCEDATA_DIR}/crystals"
48 DESTINATION "${INSTALL_DATA_DIR}/avogadro2"
49 PATTERN ".git" EXCLUDE
50 )