From 67364f59c4d0b2260b2380b0f84ef6be3a10c598 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Thu, 7 May 2015 17:25:35 +0200 Subject: Really add FindClserSis --- cmake/FindClSerSis.cmake | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 cmake/FindClSerSis.cmake (limited to 'cmake/FindClSerSis.cmake') diff --git a/cmake/FindClSerSis.cmake b/cmake/FindClSerSis.cmake new file mode 100644 index 0000000..be7ff6d --- /dev/null +++ b/cmake/FindClSerSis.cmake @@ -0,0 +1,44 @@ +IF (NOT clsersis_FOUND) + FILE(TO_CMAKE_PATH "$ENV{SISODIR5}" SISODIR5) + + IF (clsersis_INCLUDE_DIR AND clsersis_LIBRARY) + SET(CLSERSIS_FIND_QUIETLY TRUE) + ENDIF (clsersis_INCLUDE_DIR AND clsersis_LIBRARY) + + FIND_PATH(clsersis_INCLUDE_DIR clser.h + PATHS + $ENV{CLSERSIS}/include + ${CMAKE_INSTALL_PREFIX}/include + ${SISODIR5}/include + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Silicon Software GmbH\\Runtime5;Info]/include" + ) +MESSAGE(STATUS "clsersis_INCLUDE_DIR ${clsersis_INCLUDE_DIR}") + + INCLUDE(SisoLibDir) + SISO_LIB_DIR("${SISODIR5}/lib" LIB_DIRS COMPILER_LIB_DIR) + + IF (UNIX) + SET(CLSERSIS_NAME clsersis.a clsersis) + ELSE (UNIX) + SET(CLSERSIS_NAME clsersis) + ENDIF (UNIX) + + FIND_LIBRARY(clsersis_LIBRARY NAMES ${CLSERSIS_NAME} + PATHS + $ENV{CLSERSIS}/lib/${COMPILER_LIB_DIR} + $ENV{CLSERSIS}/lib + ${CMAKE_INSTALL_PREFIX}/lib/${COMPILER_LIB_DIR} + ${CMAKE_INSTALL_PREFIX}/lib + ${LIB_DIRS} + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Silicon Software GmbH\\Runtime5;Info]/lib/${COMPILER_LIB_DIR}" + "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Silicon Software GmbH\\Runtime5;Info]/lib" + ) + + INCLUDE(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(CLSERSIS DEFAULT_MSG clsersis_LIBRARY clsersis_INCLUDE_DIR) + SET(clsersis_LIBRARIES ${clsersis_LIBRARY}) +ENDIF (NOT clsersis_FOUND) + +IF (clsersis_FOUND) + SET(clsersis_LIBRARIES ${clsersis_LIBRARY}) +ENDIF (clsersis_FOUND) -- cgit v1.2.3