diff options
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/cmake/FindPION.cmake | 20 | ||||
-rw-r--r-- | contrib/cmake/FindSWI.cmake | 16 |
2 files changed, 14 insertions, 22 deletions
diff --git a/contrib/cmake/FindPION.cmake b/contrib/cmake/FindPION.cmake deleted file mode 100644 index 3a4157a..0000000 --- a/contrib/cmake/FindPION.cmake +++ /dev/null @@ -1,20 +0,0 @@ -FIND_PATH(PION_INCLUDE_DIR pion/config.hpp - PATH_SUFFIXES include - PATHS - /usr/local - /usr - /sw # Fink - /opt/local # DarwinPorts - /opt/csw # Blastwave - /opt - HINTS $ENV{PION_SRC} -) - -FIND_LIBRARY(PION_LIBRARY - NAMES pion - HINTS $ENV{PION_SRC}/src/.libs/ -) - -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(PION DEFAULT_MSG PION_LIBRARY PION_INCLUDE_DIR) -MARK_AS_ADVANCED(PION_LIBRARY PION_INCLUDE_DIR) diff --git a/contrib/cmake/FindSWI.cmake b/contrib/cmake/FindSWI.cmake index bd08711..d715615 100644 --- a/contrib/cmake/FindSWI.cmake +++ b/contrib/cmake/FindSWI.cmake @@ -47,6 +47,17 @@ foreach(SWI_SEARCH_PATH ${SWI_SEARCH_PATHS}) endif() endforeach() +set(SWI_PLATFORMS) +foreach (SWI_SEARCH_PATH ${SWI_SEARCH_PATHS}) + file(GLOB CURR_SWI_PLATFORMS ${SWI_SEARCH_PATH}/lib/swipl-${SWI_VERSION}/lib/*) + foreach(CURR_SWI_PLATFORM ${CURR_SWI_PLATFORMS}) + if(IS_DIRECTORY ${CURR_SWI_PLATFORM}) + list(APPEND SWI_PLATFORMS ${CURR_SWI_PLATFORM}) + endif() + endforeach() +endforeach() +#message(FATAL_ERROR "SWI_PLATFORMS: ${SWI_PLATFORMS}") + #message("SWI_VERSION: ${SWI_VERSION}") # -- find prolog headers @@ -80,7 +91,8 @@ FIND_LIBRARY(SWI_LIBRARY_RELEASE PATH_SUFFIXES lib/${SWI_PLATFORM_ID} # still in source directory lib/swipl-${SWI_VERSION}/lib/${SWI_PLATFORM_ID} # after make install - PATHS ${SWI_SEARCH_PATHS} + + PATHS ${SWI_SEARCH_PATHS} ${SWI_PLATFORMS} ) FIND_LIBRARY(SWI_LIBRARY_DEBUG @@ -88,7 +100,7 @@ FIND_LIBRARY(SWI_LIBRARY_DEBUG PATH_SUFFIXES lib/${SWI_PLATFORM_ID} # still in source directory lib/swipl-${SWI_VERSION}/lib/${SWI_PLATFORM_ID} # after make install - PATHS ${SWI_SEARCH_PATHS} + PATHS ${SWI_SEARCH_PATHS} ${SWI_PLATFORMS} ) if (NOT SWI_LIBRARY_DEBUG) # no explicit debug build, just reuse release |