git-svn-id: svn://db.shs.com.ru/libs@586 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
63
test/qad/FindQAD.cmake
Normal file
63
test/qad/FindQAD.cmake
Normal file
@@ -0,0 +1,63 @@
|
||||
if (POLICY CMP0017)
|
||||
cmake_policy(SET CMP0017 NEW)
|
||||
endif()
|
||||
if (POLICY CMP0011)
|
||||
cmake_policy(SET CMP0011 NEW)
|
||||
endif()
|
||||
if(NOT LIBPROJECT)
|
||||
include(QtWraps)
|
||||
endif()
|
||||
get_directory_property(hasParent PARENT_DIRECTORY)
|
||||
set(_SEARCH_DIR)
|
||||
if(WIN32)
|
||||
find_package(MinGW REQUIRED)
|
||||
endif()
|
||||
if(APPLE)
|
||||
include_directories(/usr/local/include)
|
||||
link_directories(/usr/local/lib)
|
||||
endif()
|
||||
find_file(QAD_H_INCLUDE "qad_types.h" HINTS ${PIP_DIR}/include/qad ${MINGW_INCLUDE}/qad /usr/include/qad /usr/local/include/qad $ENV{SMSDK_DIR}/include/qad)
|
||||
if (DEFINED ANDROID_PLATFORM)
|
||||
set(QAD_INCLUDES ${ANDROID_SYSTEM_LIBRARY_PATH}/usr/include/qad)
|
||||
else()
|
||||
get_filename_component(QAD_INCLUDES ${QAD_H_INCLUDE} PATH)
|
||||
endif()
|
||||
set(_SEARCH_DIR ${MINGW_LIB} /usr/lib /usr/local/lib $ENV{SMSDK_DIR}/lib)
|
||||
set(_QAD_LIBS utils widgets application blockview graphic sql_table touch_widgets)
|
||||
if(LIBPROJECT)
|
||||
set(QAD_INCLUDES)
|
||||
endif()
|
||||
foreach(_Q ${_QAD_LIBS})
|
||||
string(TOUPPER ${_Q} _QU)
|
||||
if(LIBPROJECT)
|
||||
set(QAD_${_QU}_LIBRARY qad_${_Q})
|
||||
list(APPEND QAD_INCLUDES ${QAD_DIR}/${_Q})
|
||||
else()
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
find_library(QAD${_v}_${_QU}_LIBRARY qad_${_Q}${_v} ${_SEARCH_DIR})
|
||||
set(MULTILIB_${_Q}_SUFFIX_Qt${_v} ${_v})
|
||||
if(hasParent)
|
||||
set(MULTILIB_${_Q}_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE)
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
#message(STATUS "Library ${_Q} (${_QU}) -> ${QAD_${_QU}_LIBRARY} found in ${_SEARCH_DIR}")
|
||||
list(APPEND QT_MULTILIB_LIST qad_${_Q})
|
||||
endforeach()
|
||||
list(APPEND QT_MULTILIB_LIST qglview)
|
||||
foreach(_v ${_QT_VERSIONS_})
|
||||
find_library(QGLVIEW${_v}_LIBRARY qglview${_v} ${_SEARCH_DIR})
|
||||
set(MULTILIB_qglview_SUFFIX_Qt${_v} ${_v})
|
||||
if(hasParent)
|
||||
set(MULTILIB_qglview_SUFFIX_Qt${_v} ${_v} PARENT_SCOPE)
|
||||
endif()
|
||||
endforeach()
|
||||
if(hasParent)
|
||||
set(QT_MULTILIB_LIST ${QT_MULTILIB_LIST} PARENT_SCOPE)
|
||||
endif()
|
||||
if(NOT LIBPROJECT)
|
||||
if (NOT _QAD_MSG)
|
||||
set(_QAD_MSG 1 CACHE BOOL "msg_qad" FORCE)
|
||||
message(STATUS "Found QAD")
|
||||
endif()
|
||||
endif()
|
||||
Reference in New Issue
Block a user