From: Georges Khaznadar <georgesk@debian.org>
Date: Mon, 29 Sep 2025 16:12:14 +0200
Subject: changes for cmake-4

---
 CMakeLists.txt                          | 4 ++--
 src/CMakeLists.txt                      | 2 ++
 src/acid_anhydrides/CMakeLists.txt      | 5 +++++
 src/alcohols/CMakeLists.txt             | 5 +++++
 src/aldehydes/CMakeLists.txt            | 5 +++++
 src/alkanes/CMakeLists.txt              | 5 +++++
 src/alkenes/CMakeLists.txt              | 5 +++++
 src/alkynes/CMakeLists.txt              | 5 +++++
 src/amides/CMakeLists.txt               | 5 +++++
 src/amines/CMakeLists.txt               | 5 +++++
 src/amino_acids/CMakeLists.txt          | 5 +++++
 src/aromatics/CMakeLists.txt            | 5 +++++
 src/carbamides/CMakeLists.txt           | 5 +++++
 src/carbohydrates/CMakeLists.txt        | 5 +++++
 src/carboxylic_acids/CMakeLists.txt     | 5 +++++
 src/drugs/CMakeLists.txt                | 5 +++++
 src/esters/CMakeLists.txt               | 5 +++++
 src/ethers/CMakeLists.txt               | 5 +++++
 src/fatty_acids/CMakeLists.txt          | 5 +++++
 src/haloalkanes/CMakeLists.txt          | 5 +++++
 src/heteroaromatics/CMakeLists.txt      | 5 +++++
 src/htdocs/CMakeLists.txt               | 1 +
 src/images/CMakeLists.txt               | 1 +
 src/jmol/CMakeLists.txt                 | 1 +
 src/ketones/CMakeLists.txt              | 5 +++++
 src/macrocycles/CMakeLists.txt          | 5 +++++
 src/natural_products/CMakeLists.txt     | 5 +++++
 src/nitriles/CMakeLists.txt             | 5 +++++
 src/nitroalkanes/CMakeLists.txt         | 5 +++++
 src/nucleobases/CMakeLists.txt          | 5 +++++
 src/peptides/CMakeLists.txt             | 5 +++++
 src/polycyclic_alkanes/CMakeLists.txt   | 5 +++++
 src/polycyclic_aromatics/CMakeLists.txt | 5 +++++
 src/styles/CMakeLists.txt               | 1 +
 src/sulfones/CMakeLists.txt             | 5 +++++
 src/sulfoxides/CMakeLists.txt           | 5 +++++
 src/thioethers/CMakeLists.txt           | 5 +++++
 src/thiols/CMakeLists.txt               | 5 +++++
 src/water/CMakeLists.txt                | 5 +++++
 39 files changed, 173 insertions(+), 2 deletions(-)

Index: chemical-structures/CMakeLists.txt
===================================================================
--- chemical-structures.orig/CMakeLists.txt
+++ chemical-structures/CMakeLists.txt
@@ -2,7 +2,7 @@ project(chemical-structures)
 
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
 
-cmake_minimum_required(VERSION 2.4.0)
+cmake_minimum_required(VERSION 3.5)
 
 #################################################################
 #                    Define global variables                    #
@@ -14,7 +14,7 @@ set(SHARE_HOME ${CMAKE_INSTALL_PREFIX}/s
 #################################################################
 #                        Python Settings                        #
 #################################################################
-find_package(PythonInterp REQUIRED)
+find_package(Python3 REQUIRED)
 set(MAKEINDEXFILES ${CMAKE_SOURCE_DIR}/tools/make_index_files.py)
 set(MAKEXHTMLFILES ${CMAKE_SOURCE_DIR}/tools/make_xhtml_files.py)
 
Index: chemical-structures/src/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/CMakeLists.txt
+++ chemical-structures/src/CMakeLists.txt
@@ -24,14 +24,16 @@ endforeach(lang)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET index
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEINDEXFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
 
-add_custom_command(TARGET clean_xhtml
-                   COMMAND rm *.html
-                   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
-)
+#add_custom_command(TARGET clean_xhtml
+#                   PRE_BUILD
+#                   COMMAND rm *.html
+#                   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+#)
 #################################################################
 #                         Install files                         #
 #################################################################
Index: chemical-structures/src/acid_anhydrides/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/acid_anhydrides/CMakeLists.txt
+++ chemical-structures/src/acid_anhydrides/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/alcohols/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/alcohols/CMakeLists.txt
+++ chemical-structures/src/alcohols/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/aldehydes/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/aldehydes/CMakeLists.txt
+++ chemical-structures/src/aldehydes/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/alkanes/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/alkanes/CMakeLists.txt
+++ chemical-structures/src/alkanes/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/alkenes/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/alkenes/CMakeLists.txt
+++ chemical-structures/src/alkenes/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/alkynes/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/alkynes/CMakeLists.txt
+++ chemical-structures/src/alkynes/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/amides/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/amides/CMakeLists.txt
+++ chemical-structures/src/amides/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/amines/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/amines/CMakeLists.txt
+++ chemical-structures/src/amines/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/amino_acids/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/amino_acids/CMakeLists.txt
+++ chemical-structures/src/amino_acids/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/aromatics/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/aromatics/CMakeLists.txt
+++ chemical-structures/src/aromatics/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/carbamides/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/carbamides/CMakeLists.txt
+++ chemical-structures/src/carbamides/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/carbohydrates/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/carbohydrates/CMakeLists.txt
+++ chemical-structures/src/carbohydrates/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/carboxylic_acids/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/carboxylic_acids/CMakeLists.txt
+++ chemical-structures/src/carboxylic_acids/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/drugs/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/drugs/CMakeLists.txt
+++ chemical-structures/src/drugs/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/esters/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/esters/CMakeLists.txt
+++ chemical-structures/src/esters/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/ethers/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/ethers/CMakeLists.txt
+++ chemical-structures/src/ethers/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/fatty_acids/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/fatty_acids/CMakeLists.txt
+++ chemical-structures/src/fatty_acids/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/haloalkanes/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/haloalkanes/CMakeLists.txt
+++ chemical-structures/src/haloalkanes/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/heteroaromatics/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/heteroaromatics/CMakeLists.txt
+++ chemical-structures/src/heteroaromatics/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/htdocs/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/htdocs/CMakeLists.txt
+++ chemical-structures/src/htdocs/CMakeLists.txt
@@ -17,6 +17,7 @@ foreach(htdocs_SRC_FILE ${htdocs_SRCS})
   get_filename_component(htdocs_FILE ${htdocs_SRC_FILE} NAME)
 
   add_custom_command(TARGET ${LOCAL_TARGET}
+                   PRE_BUILD
                    COMMAND cp ${htdocs_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${htdocs_FILE}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
Index: chemical-structures/src/images/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/images/CMakeLists.txt
+++ chemical-structures/src/images/CMakeLists.txt
@@ -16,6 +16,7 @@ foreach(image_SRC_FILE ${image_SRCS})
   get_filename_component(image_FILE ${image_SRC_FILE} NAME)
 
   add_custom_command(TARGET ${LOCAL_TARGET}
+                   PRE_BUILD
                    COMMAND cp ${image_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${image_FILE}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
Index: chemical-structures/src/jmol/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/jmol/CMakeLists.txt
+++ chemical-structures/src/jmol/CMakeLists.txt
@@ -22,6 +22,7 @@ foreach(jmol_SRC_FILE ${jmol_SRCS})
   get_filename_component(jmol_FILE ${jmol_SRC_FILE} NAME)
 
   add_custom_command(TARGET ${LOCAL_TARGET}
+                   PRE_BUILD
                    COMMAND cp ${jmol_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${jmol_FILE}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
Index: chemical-structures/src/ketones/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/ketones/CMakeLists.txt
+++ chemical-structures/src/ketones/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/macrocycles/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/macrocycles/CMakeLists.txt
+++ chemical-structures/src/macrocycles/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/natural_products/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/natural_products/CMakeLists.txt
+++ chemical-structures/src/natural_products/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/nitriles/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/nitriles/CMakeLists.txt
+++ chemical-structures/src/nitriles/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/nitroalkanes/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/nitroalkanes/CMakeLists.txt
+++ chemical-structures/src/nitroalkanes/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/nucleobases/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/nucleobases/CMakeLists.txt
+++ chemical-structures/src/nucleobases/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/peptides/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/peptides/CMakeLists.txt
+++ chemical-structures/src/peptides/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/polycyclic_alkanes/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/polycyclic_alkanes/CMakeLists.txt
+++ chemical-structures/src/polycyclic_alkanes/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/polycyclic_aromatics/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/polycyclic_aromatics/CMakeLists.txt
+++ chemical-structures/src/polycyclic_aromatics/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/styles/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/styles/CMakeLists.txt
+++ chemical-structures/src/styles/CMakeLists.txt
@@ -16,6 +16,7 @@ foreach(style_SRC_FILE ${style_SRCS})
   get_filename_component(style_FILE ${style_SRC_FILE} NAME)
 
   add_custom_command(TARGET ${LOCAL_TARGET}
+                   PRE_BUILD
                    COMMAND cp ${style_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${style_FILE}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
Index: chemical-structures/src/sulfones/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/sulfones/CMakeLists.txt
+++ chemical-structures/src/sulfones/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/sulfoxides/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/sulfoxides/CMakeLists.txt
+++ chemical-structures/src/sulfoxides/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/thioethers/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/thioethers/CMakeLists.txt
+++ chemical-structures/src/thioethers/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/thiols/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/thiols/CMakeLists.txt
+++ chemical-structures/src/thiols/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
Index: chemical-structures/src/water/CMakeLists.txt
===================================================================
--- chemical-structures.orig/src/water/CMakeLists.txt
+++ chemical-structures/src/water/CMakeLists.txt
@@ -30,6 +30,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
   set(cml_FILE "${cml_WE}.cml")
   # add custom command to build mol files
   add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                      COMMAND cp ${cml_SRC_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${cml_FILE}
                      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
   )
@@ -39,6 +40,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate mol files
     set(mol_FILE "${cml_WE}.mol")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -omol ${mol_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -46,6 +48,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate xyz files
     set(xyz_FILE "${cml_WE}.xyz")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -oxyz ${xyz_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -53,6 +56,7 @@ foreach(cml_SRC_FILE ${cml_SRCS})
     # Generate smi files
     set(smi_FILE "${cml_WE}.smi")
     add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                        COMMAND ${OPENBABEL2_EXECUTABLE} -icml ${cml_FILE} -osmi ${smi_FILE}
                        WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
     )
@@ -75,6 +79,7 @@ endforeach(cml_FILE)
 #                       Build XHTML files                       #
 #################################################################
 add_custom_command(TARGET ${CHEM_GROUP}
+                   PRE_BUILD
                    COMMAND ${PYTHON_EXECUTABLE} ${MAKEXHTMLFILES} ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/index.xml ${level} ${AVAILABLE_LANG}
                    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
 )
