Compare commits
10 Commits
cmake_refa
...
7d53e93799
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d53e93799 | |||
| 898d3540cf | |||
| 0183fb79b0 | |||
| 9fe2044e8f | |||
| c816ddc21e | |||
| 6c0de52180 | |||
|
43a9d8be6f
|
|||
| 8f898b103d | |||
|
|
46526851f5 | ||
| 0868a20bb5 |
6
.editorconfig
Normal file
6
.editorconfig
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*.{h,c,cpp}]
|
||||||
|
charset = utf-8
|
||||||
|
indent_style = tab
|
||||||
|
tab_width = 4
|
||||||
@@ -6,6 +6,15 @@ in your top-level CMakeLists.txt
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
get_system(OS ARCH)
|
||||||
|
|
||||||
|
Set current operating system name to OS and
|
||||||
|
target architecture to ARCH
|
||||||
|
On Linux try to retrieve OS from "os-release" or "lsb-release"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
set_version(<target> [MAJOR <value>] [MINOR <value>] [REVISION <value>] [SUFFIX <value>] [BUILD <value>] [OUTPUT <file>])
|
set_version(<target> [MAJOR <value>] [MINOR <value>] [REVISION <value>] [SUFFIX <value>] [BUILD <value>] [OUTPUT <file>])
|
||||||
|
|
||||||
Set target version, optionally creates file
|
Set target version, optionally creates file
|
||||||
@@ -122,7 +131,7 @@ at cmake-time, so if entry ends with "/" it treat
|
|||||||
as directory, else - file
|
as directory, else - file
|
||||||
|
|
||||||
FILES can be presents as cmake-generator-expressions. In this case
|
FILES can be presents as cmake-generator-expressions. In this case
|
||||||
entry treated as absolute path only if it prepened wiht "/".
|
entry treated as absolute path only if it prepened with "/".
|
||||||
Examples:
|
Examples:
|
||||||
* "/$<TARGET_FILE:myexe>" - right, TARGET_FILE is absolute path
|
* "/$<TARGET_FILE:myexe>" - right, TARGET_FILE is absolute path
|
||||||
* "$<TARGET_FILE_NAME:myexe>" - right, relative item and TARGET_FILE_NAME is only filename
|
* "$<TARGET_FILE_NAME:myexe>" - right, relative item and TARGET_FILE_NAME is only filename
|
||||||
@@ -353,6 +362,53 @@ set(__gradle_sign
|
|||||||
# Help macros end
|
# Help macros end
|
||||||
|
|
||||||
|
|
||||||
|
macro(get_system _OS _ARCH)
|
||||||
|
if (NOT MY_ARCH)
|
||||||
|
target_architecture(MY_ARCH)
|
||||||
|
endif()
|
||||||
|
if ("x${CMAKE_SYSTEM_NAME}" STREQUAL "xLinux")
|
||||||
|
set(_os_id "")
|
||||||
|
set(_os_ver "")
|
||||||
|
set(_paths "/usr/lib" "/etc")
|
||||||
|
if (CMAKE_CROSSCOMPILING)
|
||||||
|
set(_paths "")
|
||||||
|
foreach (_c ${CMAKE_PREFIX_PATH})
|
||||||
|
list(APPEND _paths "${_c}/lib" "${_c}/../etc")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
find_file(_release_file NAMES os-release lsb-release PATHS ${_paths} NO_DEFAULT_PATH)
|
||||||
|
if (NOT "x${_release_file}" STREQUAL "x")
|
||||||
|
file(STRINGS "${_release_file}" _lines)
|
||||||
|
foreach(_l ${_lines})
|
||||||
|
if ("${_l}" MATCHES "VERSION_ID=.*")
|
||||||
|
string(SUBSTRING "${_l}" 11 -1 _os_ver)
|
||||||
|
string(REPLACE "\"" "" _os_ver "${_os_ver}")
|
||||||
|
#message("VERSION_ID ${_os_ver}")
|
||||||
|
elseif ("${_l}" MATCHES "ID=.*")
|
||||||
|
string(SUBSTRING "${_l}" 3 -1 _os_id)
|
||||||
|
string(REPLACE "\"" "" _os_id "${_os_id}")
|
||||||
|
#message("ID ${_os_id}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
string(TOLOWER "${_os_id}${_os_ver}" ${_OS})
|
||||||
|
if ("x${${_OS}}" STREQUAL "x")
|
||||||
|
set(${_OS} "linux")
|
||||||
|
endif()
|
||||||
|
set(${_ARCH} "${MY_ARCH}")
|
||||||
|
elseif(WIN32)
|
||||||
|
set(${_OS} "windows")
|
||||||
|
set(${_ARCH} "${MY_ARCH}")
|
||||||
|
elseif (APPLE)
|
||||||
|
set(${_OS} "macosx")
|
||||||
|
set(${_ARCH} "x64")
|
||||||
|
elseif (DEFINED ANDROID_PLATFORM)
|
||||||
|
set(${_OS} "android")
|
||||||
|
set(${_ARCH} "all")
|
||||||
|
endif()
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
macro(deploy_target _T)
|
macro(deploy_target _T)
|
||||||
set(_DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
set(_DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||||
set(_DEPLOY_DIR "${CMAKE_INSTALL_PREFIX}")
|
set(_DEPLOY_DIR "${CMAKE_INSTALL_PREFIX}")
|
||||||
@@ -382,33 +438,33 @@ macro(deploy_target _T)
|
|||||||
foreach(_i ${ARGN})
|
foreach(_i ${ARGN})
|
||||||
if (_i IN_LIST __args)
|
if (_i IN_LIST __args)
|
||||||
set(_cur_arg "${_i}")
|
set(_cur_arg "${_i}")
|
||||||
if ("${_cur_arg}" STREQUAL "VERBOSE")
|
if ("x${_cur_arg}" STREQUAL "VERBOSE")
|
||||||
set(_VERB -v)
|
set(_VERB -v)
|
||||||
set(_WVERB)
|
set(_WVERB)
|
||||||
elseif("${_cur_arg}" STREQUAL "DMG_NO_ZIP")
|
elseif("x${_cur_arg}" STREQUAL "xDMG_NO_ZIP")
|
||||||
set(_ZIP_DMG 0)
|
set(_ZIP_DMG 0)
|
||||||
elseif("${_cur_arg}" STREQUAL "DEB_USR_DIR")
|
elseif("x${_cur_arg}" STREQUAL "xDEB_USR_DIR")
|
||||||
set(_DEB_OPT 0)
|
set(_DEB_OPT 0)
|
||||||
elseif("${_cur_arg}" STREQUAL "DEB_ADD_SERVICE")
|
elseif("x${_cur_arg}" STREQUAL "xDEB_ADD_SERVICE")
|
||||||
set(_DEB_SERVICE 1)
|
set(_DEB_SERVICE 1)
|
||||||
elseif("${_cur_arg}" STREQUAL "ADD_MANIFEST")
|
elseif("x${_cur_arg}" STREQUAL "xADD_MANIFEST")
|
||||||
set(_MANIFEST 1)
|
set(_MANIFEST 1)
|
||||||
endif()
|
endif()
|
||||||
elseif ("${_cur_arg}" STREQUAL "DESTINATION")
|
elseif ("x${_cur_arg}" STREQUAL "xDESTINATION")
|
||||||
set(_cur_arg)
|
set(_cur_arg)
|
||||||
set(_DESTINATION "${_i}/")
|
set(_DESTINATION "${_i}/")
|
||||||
elseif ("${_cur_arg}" STREQUAL "DEPLOY_DIR")
|
elseif ("x${_cur_arg}" STREQUAL "xDEPLOY_DIR")
|
||||||
set(_cur_arg)
|
set(_cur_arg)
|
||||||
set(_DEPLOY_DIR "${_i}/")
|
set(_DEPLOY_DIR "${_i}/")
|
||||||
elseif ("${_cur_arg}" STREQUAL "RESOURCES")
|
elseif ("x${_cur_arg}" STREQUAL "xRESOURCES")
|
||||||
__add_file_or_dir(_RES_DIRS _RES_FILES "${_i}" "${_DEPLOY_DIR}")
|
__add_file_or_dir(_RES_DIRS _RES_FILES "${_i}" "${_DEPLOY_DIR}")
|
||||||
elseif ("${_cur_arg}" STREQUAL "PLUGINS")
|
elseif ("x${_cur_arg}" STREQUAL "xPLUGINS")
|
||||||
__add_file_or_dir(_PLUG_DIRS _PLUG_FILES "${_i}" "${_DEPLOY_DIR}")
|
__add_file_or_dir(_PLUG_DIRS _PLUG_FILES "${_i}" "${_DEPLOY_DIR}")
|
||||||
elseif ("${_cur_arg}" STREQUAL "FILES")
|
elseif ("x${_cur_arg}" STREQUAL "xFILES")
|
||||||
__add_file_or_dir(_FILE_DIRS _FILE_FILES "${_i}" "${_DEPLOY_DIR}")
|
__add_file_or_dir(_FILE_DIRS _FILE_FILES "${_i}" "${_DEPLOY_DIR}")
|
||||||
elseif ("${_cur_arg}" STREQUAL "LIBS")
|
elseif ("x${_cur_arg}" STREQUAL "xLIBS")
|
||||||
__add_file_or_dir(_LIBS_DIRS _LIBS_FILES "${_i}" "${_DEPLOY_DIR}")
|
__add_file_or_dir(_LIBS_DIRS _LIBS_FILES "${_i}" "${_DEPLOY_DIR}")
|
||||||
elseif ("${_cur_arg}" STREQUAL "OPTIONS")
|
elseif ("x${_cur_arg}" STREQUAL "xOPTIONS")
|
||||||
list(APPEND _OPTIONS "${_i}")
|
list(APPEND _OPTIONS "${_i}")
|
||||||
endif()
|
endif()
|
||||||
#message("-i = ${_i}")
|
#message("-i = ${_i}")
|
||||||
@@ -440,43 +496,7 @@ macro(deploy_target _T)
|
|||||||
set(_TARGET_ARCH "???")
|
set(_TARGET_ARCH "???")
|
||||||
set(_TARGET_PACKAGE "???")
|
set(_TARGET_PACKAGE "???")
|
||||||
string(TIMESTAMP _TARGET_TIMESTAMP "%Y-%m-%d %H:%M:%S")
|
string(TIMESTAMP _TARGET_TIMESTAMP "%Y-%m-%d %H:%M:%S")
|
||||||
if ("x${CMAKE_SYSTEM_NAME}" STREQUAL "xLinux")
|
get_system(_TARGET_OS _TARGET_ARCH)
|
||||||
set(_os_id "")
|
|
||||||
set(_os_ver "")
|
|
||||||
set(_paths "/usr/lib" "/etc")
|
|
||||||
if (CMAKE_CROSSCOMPILING)
|
|
||||||
set(_paths "${CMAKE_PREFIX_PATH}/lib" "${CMAKE_PREFIX_PATH}/../etc")
|
|
||||||
endif()
|
|
||||||
find_file(_release_file NAMES os-release lsb-release PATHS ${_paths} NO_DEFAULT_PATH)
|
|
||||||
if (NOT "x${_release_file}" STREQUAL "x")
|
|
||||||
file(STRINGS "${_release_file}" _lines)
|
|
||||||
foreach(_l ${_lines})
|
|
||||||
if ("${_l}" MATCHES "VERSION_ID=.*")
|
|
||||||
string(SUBSTRING "${_l}" 11 -1 _os_ver)
|
|
||||||
string(REPLACE "\"" "" _os_ver "${_os_ver}")
|
|
||||||
#message("VERSION_ID ${_os_ver}")
|
|
||||||
elseif ("${_l}" MATCHES "ID=.*")
|
|
||||||
string(SUBSTRING "${_l}" 3 -1 _os_id)
|
|
||||||
string(REPLACE "\"" "" _os_id "${_os_id}")
|
|
||||||
#message("ID ${_os_id}")
|
|
||||||
endif()
|
|
||||||
endforeach()
|
|
||||||
endif()
|
|
||||||
string(TOLOWER "${_os_id}${_os_ver}" _TARGET_OS)
|
|
||||||
if ("x${_TARGET_OS}" STREQUAL "x")
|
|
||||||
set(_TARGET_OS "linux")
|
|
||||||
endif()
|
|
||||||
set(_TARGET_ARCH "${MY_ARCH}")
|
|
||||||
elseif(WIN32)
|
|
||||||
set(_TARGET_OS "windows")
|
|
||||||
set(_TARGET_ARCH "${MY_ARCH}")
|
|
||||||
elseif (APPLE)
|
|
||||||
set(_TARGET_OS "macosx")
|
|
||||||
set(_TARGET_ARCH "x64")
|
|
||||||
elseif (DEFINED ANDROID_PLATFORM)
|
|
||||||
set(_TARGET_OS "android")
|
|
||||||
set(_TARGET_ARCH "all")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if ("x${CMAKE_SYSTEM_NAME}" STREQUAL "xLinux")
|
if ("x${CMAKE_SYSTEM_NAME}" STREQUAL "xLinux")
|
||||||
set(_build "${${_T}_VERSION_BUILD}")
|
set(_build "${${_T}_VERSION_BUILD}")
|
||||||
@@ -567,10 +587,18 @@ macro(deploy_target _T)
|
|||||||
endif()
|
endif()
|
||||||
set(_dt_opts -l "${CMAKE_LDD}")
|
set(_dt_opts -l "${CMAKE_LDD}")
|
||||||
if (CMAKE_CROSSCOMPILING)
|
if (CMAKE_CROSSCOMPILING)
|
||||||
set(_dt_searchdirs "${CMAKE_PREFIX_PATH}/lib")
|
set(_dt_searchdirs "")
|
||||||
|
foreach (_c ${CMAKE_PREFIX_PATH})
|
||||||
|
set(_dt_searchdirs "${_dt_searchdirs}${_dt_delim}${_c}/lib")
|
||||||
|
endforeach()
|
||||||
if (NOT "x${CMAKE_LIBRARY_ARCHITECTURE}" STREQUAL "x")
|
if (NOT "x${CMAKE_LIBRARY_ARCHITECTURE}" STREQUAL "x")
|
||||||
set(_dt_searchdirs "${_dt_searchdirs}${_dt_delim}${CMAKE_PREFIX_PATH}/lib/${CMAKE_LIBRARY_ARCHITECTURE}")
|
foreach (_c ${CMAKE_PREFIX_PATH})
|
||||||
set(_dt_searchdirs "${_dt_searchdirs}${_dt_delim}${CMAKE_PREFIX_PATH}/../lib/${CMAKE_LIBRARY_ARCHITECTURE}")
|
set(_dt_searchdirs "${_dt_searchdirs}${_dt_delim}${_c}/lib/${CMAKE_LIBRARY_ARCHITECTURE}")
|
||||||
|
set(_dt_searchdirs "${_dt_searchdirs}${_dt_delim}${_c}/../lib/${CMAKE_LIBRARY_ARCHITECTURE}")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
if (NOT "x${PIP_DEPLOY_LIBDIR}" STREQUAL "x")
|
||||||
|
set(_dt_searchdirs "${_dt_searchdirs}${_dt_delim}${PIP_DEPLOY_LIBDIR}")
|
||||||
endif()
|
endif()
|
||||||
set(_dt_opts -L "${CMAKE_READELF}" --dpkg-workdir "${CMAKE_DPKG_WORKDIR}" -s "${_dt_searchdirs}")
|
set(_dt_opts -L "${CMAKE_READELF}" --dpkg-workdir "${CMAKE_DPKG_WORKDIR}" -s "${_dt_searchdirs}")
|
||||||
endif()
|
endif()
|
||||||
@@ -690,11 +718,16 @@ macro(deploy_target _T)
|
|||||||
__make_copy(_CMD_ _LIBS_DIRS _LIBS_FILES "${_AGD}")
|
__make_copy(_CMD_ _LIBS_DIRS _LIBS_FILES "${_AGD}")
|
||||||
set(_zip_name "${_TV}_${_TARGET_OS}_${_TARGET_ARCH}.zip")
|
set(_zip_name "${_TV}_${_TARGET_OS}_${_TARGET_ARCH}.zip")
|
||||||
set(_TARGET_PACKAGE "${_zip_name}")
|
set(_TARGET_PACKAGE "${_zip_name}")
|
||||||
|
set(_search_path "")
|
||||||
|
foreach (_c ${CMAKE_PREFIX_PATH})
|
||||||
|
set(_search_path "${_search_path}${_dt_delim}${_c}/bin")
|
||||||
|
endforeach()
|
||||||
|
set(_search_path "${_search_path}${_dt_delim}${MINGW_BIN}${_add_search_path}${_dt_delim}${MINGW_LIB}")
|
||||||
add_custom_target(deploy_${_T}
|
add_custom_target(deploy_${_T}
|
||||||
# gather dir
|
# gather dir
|
||||||
${_CMD_}
|
${_CMD_}
|
||||||
|
|
||||||
COMMAND ${PIP_DEPLOY_TOOL} ${_VERB} ${_OPTIONS} -W "\"${CMAKE_OBJDUMP}\"" -P windows,minimal -S windows -q "\"${Qt${_Qt_}_ROOT}\"" -s "\"${CMAKE_PREFIX_PATH}/bin${_dt_delim}${MINGW_BIN}${_add_search_path}${_dt_delim}${MINGW_LIB}\"" -o "${_AGD}" -p "${_AGD}" "\"${_AGD}$<TARGET_FILE_NAME:${_T}>\"" ${_ADD_DEPS}
|
COMMAND ${PIP_DEPLOY_TOOL} ${_VERB} ${_OPTIONS} -W "\"${CMAKE_OBJDUMP}\"" -P windows,minimal -S windows -q "\"${Qt${_Qt_}_ROOT}\"" -s "\"${_search_path}\"" -o "${_AGD}" -p "${_AGD}" "\"${_AGD}$<TARGET_FILE_NAME:${_T}>\"" ${_ADD_DEPS}
|
||||||
# zip
|
# zip
|
||||||
COMMAND cd "\"${_DEPLOY_DIR}\"" "&&" zip -q -r "\"${_DESTINATION}/${_zip_name}\"" "\"${_TV}_win_${MY_ARCH}\""
|
COMMAND cd "\"${_DEPLOY_DIR}\"" "&&" zip -q -r "\"${_DESTINATION}/${_zip_name}\"" "\"${_TV}_win_${MY_ARCH}\""
|
||||||
COMMENT "Generating ${_zip_name}"
|
COMMENT "Generating ${_zip_name}"
|
||||||
@@ -744,6 +777,11 @@ macro(deploy_target _T)
|
|||||||
set(_TARGET_PACKAGE "${_dmg_name}.zip")
|
set(_TARGET_PACKAGE "${_dmg_name}.zip")
|
||||||
endif()
|
endif()
|
||||||
set(_comment "Generating ${_TARGET_PACKAGE}")
|
set(_comment "Generating ${_TARGET_PACKAGE}")
|
||||||
|
set(_search_path "")
|
||||||
|
foreach (_c ${CMAKE_PREFIX_PATH})
|
||||||
|
set(_search_path "${_search_path}${_dt_delim}${_c}/lib")
|
||||||
|
endforeach()
|
||||||
|
set(_search_path "${_search_path}${_add_search_path}")
|
||||||
add_custom_target(deploy_${_T}
|
add_custom_target(deploy_${_T}
|
||||||
# gather .app dir
|
# gather .app dir
|
||||||
COMMAND mkdir ${_VERB} -p "${_res_path}"
|
COMMAND mkdir ${_VERB} -p "${_res_path}"
|
||||||
@@ -751,7 +789,7 @@ macro(deploy_target _T)
|
|||||||
COMMAND mkdir ${_VERB} -p "${_pli_path}"
|
COMMAND mkdir ${_VERB} -p "${_pli_path}"
|
||||||
COMMAND mkdir ${_VERB} -p "${_DESTINATION}"
|
COMMAND mkdir ${_VERB} -p "${_DESTINATION}"
|
||||||
${_CMD_}
|
${_CMD_}
|
||||||
COMMAND ${PIP_DEPLOY_TOOL} ${_VERB} ${_OPTIONS} -M "${CMAKE_OTOOL}" -P cocoa,minimal -S mac -q "${Qt5_ROOT}" --qt-conf-dir "${_res_path}" --qt-plugins-dir "${_pli_path}" -s "${CMAKE_PREFIX_PATH}/lib${_add_search_path}" -o "${_lib_path}" "${_bin_path}/${_T}" ${_ADD_DEPS}
|
COMMAND ${PIP_DEPLOY_TOOL} ${_VERB} ${_OPTIONS} -M "${CMAKE_OTOOL}" -P cocoa,minimal -S mac -q "${Qt5_ROOT}" --qt-conf-dir "${_res_path}" --qt-plugins-dir "${_pli_path}" -s "${_search_path}" -o "${_lib_path}" "${_bin_path}/${_T}" ${_ADD_DEPS}
|
||||||
# prepare dmg dir
|
# prepare dmg dir
|
||||||
COMMAND rm -rf "${_DMG}"
|
COMMAND rm -rf "${_DMG}"
|
||||||
COMMAND mkdir ${_VERB} -p "${_DMG}"
|
COMMAND mkdir ${_VERB} -p "${_DMG}"
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
# Download and unpack googletest at configure time
|
|
||||||
configure_file(GTestCMakeLists.txt.in googletest-download/CMakeLists.txt)
|
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}" .
|
|
||||||
RESULT_VARIABLE result
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download )
|
|
||||||
if(result)
|
|
||||||
message(FATAL_ERROR "CMake step for googletest failed: ${result}")
|
|
||||||
endif()
|
|
||||||
execute_process(COMMAND ${CMAKE_COMMAND} --build .
|
|
||||||
RESULT_VARIABLE result
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/googletest-download )
|
|
||||||
if(result)
|
|
||||||
message(FATAL_ERROR "Build step for googletest failed: ${result}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Prevent overriding the parent project's compiler/linker
|
|
||||||
# settings on Windows
|
|
||||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
|
||||||
|
|
||||||
# Add googletest directly to our build. This defines
|
|
||||||
# the gtest and gtest_main targets.
|
|
||||||
add_subdirectory(${CMAKE_CURRENT_BINARY_DIR}/googletest-src
|
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/googletest-build
|
|
||||||
EXCLUDE_FROM_ALL)
|
|
||||||
|
|
||||||
# The gtest/gtest_main targets carry header search path
|
|
||||||
# dependencies automatically when using CMake 2.8.11 or
|
|
||||||
# later. Otherwise we have to add them here ourselves.
|
|
||||||
if (CMAKE_VERSION VERSION_LESS 2.8.11)
|
|
||||||
include_directories("${gtest_SOURCE_DIR}/include")
|
|
||||||
endif()
|
|
||||||
@@ -15,6 +15,7 @@ if(${MINGW})
|
|||||||
find_library(_mingw_lib_m m HINTS ${MINGW_BIN}/../lib ${MINGW_INCLUDE}/../lib)
|
find_library(_mingw_lib_m m HINTS ${MINGW_BIN}/../lib ${MINGW_INCLUDE}/../lib)
|
||||||
get_filename_component(_mingw_lib ${_mingw_lib_m} PATH)
|
get_filename_component(_mingw_lib ${_mingw_lib_m} PATH)
|
||||||
set(MINGW_LIB "${_mingw_lib}" CACHE PATH "" FORCE)
|
set(MINGW_LIB "${_mingw_lib}" CACHE PATH "" FORCE)
|
||||||
|
list(APPEND CMAKE_LIBRARY_PATH "${MINGW_LIB}")
|
||||||
if (NOT _MGW_MSG)
|
if (NOT _MGW_MSG)
|
||||||
set(_MGW_MSG 1 CACHE BOOL "msg_mingw" FORCE)
|
set(_MGW_MSG 1 CACHE BOOL "msg_mingw" FORCE)
|
||||||
message(STATUS "Found MinGW binary path = ${MINGW_BIN}")
|
message(STATUS "Found MinGW binary path = ${MINGW_BIN}")
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ macro(shstk_find_header name filename add_find_info)
|
|||||||
get_filename_component(_inc ${${name}_H_INCLUDE} PATH)
|
get_filename_component(_inc ${${name}_H_INCLUDE} PATH)
|
||||||
set(${name}_INCLUDES "${_inc}" CACHE STRING "")
|
set(${name}_INCLUDES "${_inc}" CACHE STRING "")
|
||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
check_symbol_exists(${name}_VERSION_NAME "${${name}_H_INCLUDE}" _${name}_version_found)
|
check_symbol_exists(${${name}_uppercase}_VERSION_NAME "${${name}_H_INCLUDE}" _${name}_version_found)
|
||||||
if (_${name}_version_found)
|
if (_${name}_version_found)
|
||||||
file(STRINGS "${${name}_H_INCLUDE}" _version REGEX "^[ \t]*#define[ \t]+${${name}_uppercase}_VERSION_NAME+[ \t]+.*$")
|
file(STRINGS "${${name}_H_INCLUDE}" _version REGEX "^[ \t]*#define[ \t]+${${name}_uppercase}_VERSION_NAME+[ \t]+.*$")
|
||||||
string(REGEX MATCH "\".*\"" _version ${_version})
|
string(REGEX MATCH "\".*\"" _version ${_version})
|
||||||
|
|||||||
@@ -101,6 +101,11 @@ macro(shstk_qad_plugin NAME _MODULES _LIBS)
|
|||||||
qad_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
qad_wrap(${SRC} CPPS out_CPP QMS out_QM)
|
||||||
qad_add_library(${PROJ_NAME} SHARED out_CPP)
|
qad_add_library(${PROJ_NAME} SHARED out_CPP)
|
||||||
qad_target_link_libraries(${PROJ_NAME} ${_LIBS} ${_${NAME}_PLUGIN_LIBS})
|
qad_target_link_libraries(${PROJ_NAME} ${_LIBS} ${_${NAME}_PLUGIN_LIBS})
|
||||||
|
foreach(_v ${_QT_VERSIONS_})
|
||||||
|
if (LOCAL_FOUND${_v})
|
||||||
|
target_include_directories(${PROJ_NAME}${TARGET_SUFFIX_Qt${_v}} PRIVATE "${Qt${_v}Designer_PRIVATE_INCLUDE_DIRS}")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
qad_install(TARGETS ${PROJ_NAME} RUNTIME DESTINATION QtPlugins/designer)
|
qad_install(TARGETS ${PROJ_NAME} RUNTIME DESTINATION QtPlugins/designer)
|
||||||
else()
|
else()
|
||||||
|
|||||||
Reference in New Issue
Block a user