android/win build ok
This commit is contained in:
143
CMakeLists.txt
143
CMakeLists.txt
@@ -11,8 +11,10 @@ set(CMAKE_MODULE_PATH
|
|||||||
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/pip/cmake"
|
"${CMAKE_CURRENT_SOURCE_DIR}/pip/cmake"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/qad/cmake"
|
"${CMAKE_CURRENT_SOURCE_DIR}/qad/cmake"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/qglengine/cmake"
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/cd_utils/cmake"
|
"${CMAKE_CURRENT_SOURCE_DIR}/cd_utils/cmake"
|
||||||
)
|
)
|
||||||
|
set(ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
|
||||||
include(QtWraps)
|
include(QtWraps)
|
||||||
include(SHSTKMacros)
|
include(SHSTKMacros)
|
||||||
@@ -20,8 +22,8 @@ include(SHSTKMacros)
|
|||||||
shstk_begin_project("" "")
|
shstk_begin_project("" "")
|
||||||
|
|
||||||
option(CROSSTOOLS "Crosstools minimal build" OFF)
|
option(CROSSTOOLS "Crosstools minimal build" OFF)
|
||||||
option(QGLVIEW "Build QGLView library and utils" OFF)
|
option(QGLVIEW "Build QGLView library and utils" ON)
|
||||||
option(QGLENGINE "Build QGLEngine library and utils" OFF)
|
option(QGLENGINE "Build QGLEngine library and utils" ON)
|
||||||
option(UTILS "Build various utils" ${_plugins_default_})
|
option(UTILS "Build various utils" ${_plugins_default_})
|
||||||
option(DESIGNER_PLUGINS "Build Qt designer plugins" ${_plugins_default_})
|
option(DESIGNER_PLUGINS "Build Qt designer plugins" ${_plugins_default_})
|
||||||
if (CROSSTOOLS)
|
if (CROSSTOOLS)
|
||||||
@@ -33,142 +35,31 @@ if (CROSSTOOLS)
|
|||||||
endif()
|
endif()
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
|
||||||
|
add_subdirectory(cmake)
|
||||||
|
|
||||||
add_subdirectory(pip)
|
add_subdirectory(pip)
|
||||||
find_package(PIP REQUIRED)
|
find_package(PIP REQUIRED)
|
||||||
|
|
||||||
find_qt(Core QUIET)
|
if (NOT CROSSTOOLS)
|
||||||
if (SOME_QT_FOUND)
|
|
||||||
|
|
||||||
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)
|
find_qt(Core QUIET)
|
||||||
set(QtVersions)
|
if (SOME_QT_FOUND)
|
||||||
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(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)
|
add_subdirectory(qad)
|
||||||
include_directories(${qad_includes})
|
find_package(QAD REQUIRED)
|
||||||
add_subdirectory(piqt)
|
|
||||||
include_directories(${piqt_includes})
|
if (QGLENGINE)
|
||||||
set(_DIRS)
|
add_subdirectory(qglengine)
|
||||||
if (Qt5)
|
|
||||||
if (QGLVIEW)
|
|
||||||
list(APPEND _DIRS qglview)
|
|
||||||
endif()
|
|
||||||
if (QGLENGINE)
|
|
||||||
list(APPEND _DIRS qglengine)
|
|
||||||
endif()
|
|
||||||
endif()
|
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()
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(cd)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32 AND SOME_QT_FOUND)
|
||||||
foreach(PIP_LT ${PIP_MODULES})
|
foreach(_l ${PIP_MODULES} ${CD_MODULES})
|
||||||
if (SomeQtFound)
|
qt_install(TARGETS ${_l} RUNTIME DESTINATION QtBin)
|
||||||
qt_install(FILES "${CMAKE_CURRENT_BINARY_DIR}/pip/lib${PIP_LT}.dll" DESTINATION QtBin)
|
|
||||||
endif()
|
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
2
cd
2
cd
Submodule cd updated: 5a49104273...6fc2e51b8a
2
cmake
2
cmake
Submodule cmake updated: c350c61e36...b6a0275d48
@@ -2,5 +2,5 @@
|
|||||||
set ARCH=%~1
|
set ARCH=%~1
|
||||||
set PATH=%SDK_MINGW_DIR%%ARCH%\bin;%SDK_QT4_DIR%%ARCH%\bin;%SDK_CMAKE_DIR%\bin
|
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%
|
if defined SDK_QT5_DIR set Qt5_DIR=%SDK_QT5_DIR%%ARCH%
|
||||||
mkdir ..\libs_build_win%ARCH%
|
mkdir ..\shstk_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
|
cd ../shstk_build_win%ARCH% && cmake_mgw -Wno-dev -DQGLVIEW=1 -DQGLENGINE=1 -DQT4=0 ../shstk && make install -j4 && cd ../shstk && pause
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
@echo off
|
@echo off
|
||||||
mkdir ..\libs_build_android_%~1
|
mkdir ..\shstk_build_android_%~1
|
||||||
cd ..\libs_build_android_%~1
|
cd ..\shstk_build_android_%~1
|
||||||
call ..\libs\cmake_android 21 %~1 ..\libs "-DUTILS=0 -DDEBUG=0 -DCMAKE_BUILD_TYPE=Release"
|
call ..\shstk\cmake\cmake_android 21 %~1 ..\shstk "-DUTILS=0 -DCMAKE_BUILD_TYPE=Release"
|
||||||
call make install -j4
|
call make install -j4
|
||||||
cd ..\libs
|
cd ..\shstk
|
||||||
|
|||||||
2
qad
2
qad
Submodule qad updated: c576a14deb...5ed8d8114a
Submodule qglengine updated: 1ea56dc594...6648be5421
Reference in New Issue
Block a user