1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- message(STATUS "***** Find SM Library *****")
- find_path(SM_INCLUDE_DIR
- NAMES smclass.h
- PATHS ${CMAKE_CURRENT_LIST_DIR}/inc
- NO_DEFAULT_PATH
- )
- find_path(SM_SOURCE_DIR
- NAMES smclass.cpp
- PATHS ${CMAKE_CURRENT_LIST_DIR}/src
- NO_DEFAULT_PATH
- )
-
- if(CMAKE_SYSTEM_NAME MATCHES "Windows")
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- if(CMAKE_BUILD_TYPE MATCHES "Debug")
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/win/x64/with_debug_info/libSM_DLL.lib)
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/win/x64/ucrtbased.dll)
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/win/x64/vcruntime140d.dll)
- else()
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/win/x64/libSM_DLL.lib)
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/win/x64/ucrtbase.dll)
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/win/x64/vcruntime140.dll)
- endif()
- elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
- if(CMAKE_BUILD_TYPE MATCHES "Debug")
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/win/x86/with_debug_info/libSM_DLL.lib)
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/win/x86/ucrtbased.dll)
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/win/x86/vcruntime140d.dll)
- else()
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/win/x86/libSM_DLL.lib)
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/win/x86/ucrtbase.dll)
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/win/x86/vcruntime140.dll)
- endif()
- endif()
- elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
- if(CMAKE_BUILD_TYPE MATCHES "Debug")
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/linux/x64/libSM_Dll.so)
- else()
- list(APPEND SM_LIB_LIBRARY ${CMAKE_CURRENT_LIST_DIR}/libs/linux/x64/libSM_Dll.so)
- endif()
- endif()
- if(SM_INCLUDE_DIR AND SM_SOURCE_DIR AND SM_LIB_LIBRARY)
- set(SM_FOUND TRUE)
- else()
- set(SM_FOUND FALSE)
- endif()
- message(STATUS "include : SM_INCLUDE_DIR")
- message(STATUS "source : SM_SOURCE_DIR")
- message(STATUS "Library : SM_LIB_LIBRARY")
- message(STATUS "---------------------------------")
|