android/win build ok

This commit is contained in:
2020-09-06 22:51:29 +03:00
parent 87cd43a913
commit e86cca495f
7 changed files with 27 additions and 136 deletions

View File

@@ -11,8 +11,10 @@ set(CMAKE_MODULE_PATH
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/pip/cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/qad/cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/qglengine/cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/cd_utils/cmake"
)
set(ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
include(QtWraps)
include(SHSTKMacros)
@@ -20,8 +22,8 @@ include(SHSTKMacros)
shstk_begin_project("" "")
option(CROSSTOOLS "Crosstools minimal build" OFF)
option(QGLVIEW "Build QGLView library and utils" OFF)
option(QGLENGINE "Build QGLEngine library and utils" OFF)
option(QGLVIEW "Build QGLView library and utils" ON)
option(QGLENGINE "Build QGLEngine library and utils" ON)
option(UTILS "Build various utils" ${_plugins_default_})
option(DESIGNER_PLUGINS "Build Qt designer plugins" ${_plugins_default_})
if (CROSSTOOLS)
@@ -33,142 +35,31 @@ if (CROSSTOOLS)
endif()
set(CMAKE_CXX_STANDARD 11)
add_subdirectory(cmake)
add_subdirectory(pip)
find_package(PIP REQUIRED)
find_qt(Core QUIET)
if (SOME_QT_FOUND)
if (NOT CROSSTOOLS)
add_subdirectory(qad)
find_package(QAD REQUIRED)
endif()
#message("cmg = \"${PIP_CMG}\"")
#if (PIP_FOUND)
# message("found pip = \"${PIP_FOUND}\"")
#endif()
#message("inc = \"${PIP_INCLUDES}\"")
qt_add_executable(aaa ${CMAKE_CURRENT_SOURCE_DIR}/pip/main.cpp)
qt_target_link_libraries(aaa QAD::PIQtUtils)
#deploy_target(aaa DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR})
return()
add_subdirectory(cmake)
if (CROSSTOOLS)
add_subdirectory(pip)
file(GLOB CMAKES "qad/cmake/*.cmake" "qad/cmake/*.in")
install(FILES ${CMAKES} DESTINATION ${CMAKE_ROOT}/Modules)
else()
include(QtWraps)
find_qt(Core QUIET)
set(QtVersions)
set(SomeQtFound 0)
foreach(_v ${_QT_VERSIONS_})
option(Qt${_v} "Build for Qt${_v}" 1)
if (Qt${_v})
#message("Qt${_v} -> ${LOCAL_FOUND${_v}}")
if (LOCAL_FOUND${_v})
list(APPEND QtVersions Qt${_v})
set(SomeQtFound 1)
endif()
endif()
endforeach()
if (SOME_QT_FOUND)
#if(UTILS)
# message(STATUS "Building with utils")
#else()
# message(STATUS "Building only libraries")
#endif()
add_subdirectory(pip)
foreach(F ${PIP_MAIN_FOLDERS})
list(APPEND PIP_INCLUDES "${F}")
endforeach(F)
add_subdirectory(cd_utils)
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/cd_utils" "${CMAKE_CURRENT_BINARY_DIR}/cd_utils")
set(_DIRS)
if (SomeQtFound)
#message(STATUS "Building Qt-derived targets for ${QtVersions}")
add_subdirectory(qad)
include_directories(${qad_includes})
add_subdirectory(piqt)
include_directories(${piqt_includes})
set(_DIRS)
if (Qt5)
if (QGLVIEW)
list(APPEND _DIRS qglview)
endif()
if (QGLENGINE)
list(APPEND _DIRS qglengine)
endif()
find_package(QAD REQUIRED)
if (QGLENGINE)
add_subdirectory(qglengine)
endif()
foreach(_D ${_DIRS})
list(APPEND QT_MULTILIB_LIST ${_D})
add_subdirectory(${_D})
endforeach(_D)
macro(align_list _list _out)
set(_max_len 0)
foreach(_m ${_list})
string(LENGTH "${_m}" _clen)
if (_clen GREATER _max_len)
set(_max_len ${_clen})
endif()
endforeach()
set(${_out})
foreach(_m ${_list})
set(_am "${_m}")
while(TRUE)
string(LENGTH "${_am}" _clen)
if (_clen GREATER_EQUAL ${_max_len})
break()
endif()
string(APPEND _am " ")
endwhile()
list(APPEND ${_out} "${_am}")
endforeach()
endmacro()
macro(print_list _list _name)
if (NOT "x${_list}" STREQUAL "x")
message("")
message(" ${_name}:")
#align_list("${_list}" _alist)
foreach(_m ${_list})
message(" * ${_m}")
endforeach()
endif()
endmacro()
message("----------QAD-----------")
message(" Build for ${QtVersions}")
message(" QAD Version: ${QAD_VERSION}")
message(" QAD Linkage: ${QAD_LIB_TYPE_MSG}")
message(" PIQt Version: ${PIQt_VERSION}")
message(" PIQt Linkage: ${PIQt_LIB_TYPE_MSG}")
print_list("${_qt_libs}" "Libraries")
print_list("${_qt_apps}" "Applications")
print_list("${_qt_plugs}" "Plugins")
message("-----------------------")
message("")
else()
message(STATUS "None of Qt found, skip Qt-derived targets")
endif()
add_subdirectory(cd)
endif()
if(WIN32)
foreach(PIP_LT ${PIP_MODULES})
if (SomeQtFound)
qt_install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pip/lib${PIP_LT}.dll" DESTINATION QtBin)
endif()
if(WIN32 AND SOME_QT_FOUND)
foreach(_l ${PIP_MODULES} ${CD_MODULES})
qt_install(TARGETS ${_l} RUNTIME DESTINATION QtBin)
endforeach()
endif()

2
cd

Submodule cd updated: 5a49104273...6fc2e51b8a

2
cmake

Submodule cmake updated: c350c61e36...b6a0275d48

View File

@@ -2,5 +2,5 @@
set ARCH=%~1
set PATH=%SDK_MINGW_DIR%%ARCH%\bin;%SDK_QT4_DIR%%ARCH%\bin;%SDK_CMAKE_DIR%\bin
if defined SDK_QT5_DIR set Qt5_DIR=%SDK_QT5_DIR%%ARCH%
mkdir ..\libs_build_win%ARCH%
cd ../libs_build_win%ARCH% && cmake_mgw -Wno-dev -DQGLVIEW=1 -DQGLENGINE=1 -DQT4=0 ../libs && make install -j4 && cd ../libs && pause
mkdir ..\shstk_build_win%ARCH%
cd ../shstk_build_win%ARCH% && cmake_mgw -Wno-dev -DQGLVIEW=1 -DQGLENGINE=1 -DQT4=0 ../shstk && make install -j4 && cd ../shstk && pause

View File

@@ -1,6 +1,6 @@
@echo off
mkdir ..\libs_build_android_%~1
cd ..\libs_build_android_%~1
call ..\libs\cmake_android 21 %~1 ..\libs "-DUTILS=0 -DDEBUG=0 -DCMAKE_BUILD_TYPE=Release"
mkdir ..\shstk_build_android_%~1
cd ..\shstk_build_android_%~1
call ..\shstk\cmake\cmake_android 21 %~1 ..\shstk "-DUTILS=0 -DCMAKE_BUILD_TYPE=Release"
call make install -j4
cd ..\libs
cd ..\shstk

2
qad

Submodule qad updated: c576a14deb...5ed8d8114a