diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-06-12 23:02:12 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-06-12 23:02:12 (GMT) |
commit | 57510db0f3f10f85ecea53376ccf40688e2475bd (patch) | |
tree | a5c19df017c945ab1c931c979ed2dbad1afe25e2 /contrib/cmake/FindSWI.cmake | |
parent | d22ea4f60d6fee6a7dc564e5e83719eb2c189425 (diff) | |
download | uscxml-57510db0f3f10f85ecea53376ccf40688e2475bd.zip uscxml-57510db0f3f10f85ecea53376ccf40688e2475bd.tar.gz uscxml-57510db0f3f10f85ecea53376ccf40688e2475bd.tar.bz2 |
Fixed build issues on unices
Diffstat (limited to 'contrib/cmake/FindSWI.cmake')
-rw-r--r-- | contrib/cmake/FindSWI.cmake | 16 |
1 files changed, 14 insertions, 2 deletions
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 |