diff --git a/External/FreeSASA/CMakeLists.txt b/External/FreeSASA/CMakeLists.txt index 43dfbdc40..880231b01 100644 --- a/External/FreeSASA/CMakeLists.txt +++ b/External/FreeSASA/CMakeLists.txt @@ -67,9 +67,11 @@ endif() set (freesasa_h ${FREESASA_SRC_DIR}/src/freesasa.h) file(READ ${freesasa_h} freesasa_h_data) -string(REGEX REPLACE "(#include )" "\\1\n#include " freesasa_h_data "${freesasa_h_data}") -string(REGEX REPLACE "([^R][^D][^K][^I][^T][^_][^F][^R][^E][^E][^S][^A][^S][^A][^_][^C][^L][^I][^B][^_][^E][^X][^P][^O][^R][^T][^ ])(extern const)" "\\1RDKIT_FREESASA_CLIB_EXPORT \\2" freesasa_h_data "${freesasa_h_data}") -file(WRITE ${freesasa_h} "${freesasa_h_data}") +if (NOT freesasa_h_data MATCHES "RDGeneral/export") + string(REGEX REPLACE "(#include )" "\\1\n#include " freesasa_h_data "${freesasa_h_data}") + string(REGEX REPLACE "([^R][^D][^K][^I][^T][^_][^F][^R][^E][^E][^S][^A][^S][^A][^_][^C][^L][^I][^B][^_][^E][^X][^P][^O][^R][^T][^ ])(extern const)" "\\1RDKIT_FREESASA_CLIB_EXPORT \\2" freesasa_h_data "${freesasa_h_data}") + file(WRITE ${freesasa_h} "${freesasa_h_data}") +endif() add_definitions(-DUSE_THREADS=0) add_definitions(-DUSE_JSON=0)