Skip to content
Snippets Groups Projects
Commit 0151e609 authored by Bienchen's avatar Bienchen
Browse files

Fixed setting ProMod3s own compounds lib

parent 9f2d6e21
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
macro(find_OPENSTRUCTURE OST_ROOT NAMES HEADER_NAMES PYMOD_NAME) macro(find_OPENSTRUCTURE OST_ROOT NAMES HEADER_NAMES PYMOD_NAME)
if (NOT OPENSTRUCTURE_FIND_COMPONENTS) if(NOT OPENSTRUCTURE_FIND_COMPONENTS)
message(FATAL_ERROR "Please specify which modules of OpenStructure you " message(FATAL_ERROR "Please specify which modules of OpenStructure you "
"would like to use after the COMPONENTS keyword.") "would like to use after the COMPONENTS keyword.")
endif() endif()
...@@ -32,8 +32,8 @@ macro(find_OPENSTRUCTURE OST_ROOT NAMES HEADER_NAMES PYMOD_NAME) ...@@ -32,8 +32,8 @@ macro(find_OPENSTRUCTURE OST_ROOT NAMES HEADER_NAMES PYMOD_NAME)
PATH_SUFFIXES lib lib64 PATH_SUFFIXES lib lib64
NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH NO_SYSTEM_ENVIRONMENT_PATH NO_DEFAULT_PATH
) )
if (NOT FOUND_LIB) if(NOT FOUND_LIB)
if (OPENSTRUCTURE_FIND_REQUIRED) if(OPENSTRUCTURE_FIND_REQUIRED)
message(FATAL_ERROR "Could not find library ost_${LIB}. Please specify" message(FATAL_ERROR "Could not find library ost_${LIB}. Please specify"
" the location of your OpenStructure installation with" " the location of your OpenStructure installation with"
" OST_ROOT") " OST_ROOT")
...@@ -56,7 +56,7 @@ macro(find_OPENSTRUCTURE OST_ROOT NAMES HEADER_NAMES PYMOD_NAME) ...@@ -56,7 +56,7 @@ macro(find_OPENSTRUCTURE OST_ROOT NAMES HEADER_NAMES PYMOD_NAME)
PATH_SUFFIXES lib lib64 PATH_SUFFIXES lib lib64
) )
if(NOT OST_PYMOD_PATH) if(NOT OST_PYMOD_PATH)
if (OPENSTRUCTURE_FIND_REQUIRED) if(OPENSTRUCTURE_FIND_REQUIRED)
message(FATAL_ERROR "Could not find Python module of OST. " message(FATAL_ERROR "Could not find Python module of OST. "
"Please specify the location of your OST " "Please specify the location of your OST "
"installation with OST_ROOT") "installation with OST_ROOT")
...@@ -65,7 +65,7 @@ macro(find_OPENSTRUCTURE OST_ROOT NAMES HEADER_NAMES PYMOD_NAME) ...@@ -65,7 +65,7 @@ macro(find_OPENSTRUCTURE OST_ROOT NAMES HEADER_NAMES PYMOD_NAME)
# compounds.chemlib # compounds.chemlib
# if no -DCOMPOUND_LIB is given, try to find it in OST_ROOT # if no -DCOMPOUND_LIB is given, try to find it in OST_ROOT
if (COMPOUND_LIB) if(COMPOUND_LIB)
if(NOT EXISTS "${COMPOUND_LIB}") if(NOT EXISTS "${COMPOUND_LIB}")
message(FATAL_ERROR message(FATAL_ERROR
"Could not find compound library at '${COMPOUND_LIB}'") "Could not find compound library at '${COMPOUND_LIB}'")
...@@ -73,7 +73,7 @@ macro(find_OPENSTRUCTURE OST_ROOT NAMES HEADER_NAMES PYMOD_NAME) ...@@ -73,7 +73,7 @@ macro(find_OPENSTRUCTURE OST_ROOT NAMES HEADER_NAMES PYMOD_NAME)
if(NOT IS_ABSOLUTE "${COMPOUND_LIB}") if(NOT IS_ABSOLUTE "${COMPOUND_LIB}")
get_filename_component(COMPOUND_LIB "${COMPOUND_LIB}" ABSOLUTE) get_filename_component(COMPOUND_LIB "${COMPOUND_LIB}" ABSOLUTE)
endif(NOT IS_ABSOLUTE "${COMPOUND_LIB}") endif(NOT IS_ABSOLUTE "${COMPOUND_LIB}")
set(OST_COMPOUNDS_CHEMLIB_PATH "${COMPOUND_LIB}") set(OST_COMPOUNDS_CHEMLIB_PATH "\\\\\\\\\"${COMPOUND_LIB}\\\\\\\\\"")
else(COMPOUND_LIB) else(COMPOUND_LIB)
set(_clib_name "compounds.chemlib") set(_clib_name "compounds.chemlib")
find_path_recursive(OST_COMPOUNDS_CHEMLIB_PATH find_path_recursive(OST_COMPOUNDS_CHEMLIB_PATH
...@@ -93,7 +93,7 @@ macro(find_OPENSTRUCTURE OST_ROOT NAMES HEADER_NAMES PYMOD_NAME) ...@@ -93,7 +93,7 @@ macro(find_OPENSTRUCTURE OST_ROOT NAMES HEADER_NAMES PYMOD_NAME)
endif(COMPOUND_LIB) endif(COMPOUND_LIB)
set(OPENSTRUCTURE_FOUND 1) set(OPENSTRUCTURE_FOUND 1)
endmacro() endmacro(find_OPENSTRUCTURE)
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
SET(LIBNAMES SET(LIBNAMES
...@@ -125,11 +125,11 @@ mark_as_advanced( ...@@ -125,11 +125,11 @@ mark_as_advanced(
OST_COMPOUNDS_CHEMLIB_PATH OST_COMPOUNDS_CHEMLIB_PATH
) )
if (OPENSTRUCTURE_FOUND) if(OPENSTRUCTURE_FOUND)
if (NOT OPENSTRUCTURE_FIND_QUIETLY) if(NOT OPENSTRUCTURE_FIND_QUIETLY)
endif () endif()
else (OPENSTRUCTURE_FOUND) else(OPENSTRUCTURE_FOUND)
if (OPENSTRUCTURE_FIND_REQUIRED) if(OPENSTRUCTURE_FIND_REQUIRED)
message(FATAL_ERROR "Could not find OpenStructure") message(FATAL_ERROR "Could not find OpenStructure")
endif () endif()
endif () endif()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment