1
0
mirror of https://gitee.com/drabel/LibQQt.git synced 2025-01-04 10:18:44 +08:00
LibQQt/CMakeLists.txt

69 lines
1.9 KiB
CMake
Raw Normal View History

2017-09-05 18:07:05 +08:00
cmake_minimum_required(VERSION 2.8.12)
##tool chain file.cmake
2017-09-14 17:41:45 +08:00
#set(CMAKE_COMPILER_IS_GNUCXX TRUE)
2017-09-14 17:41:45 +08:00
# Skip the platform compiler checks for cross compiling
set (CMAKE_CXX_COMPILER_WORKS TRUE)
set (CMAKE_C_COMPILER_WORKS TRUE)
2017-09-14 17:41:45 +08:00
set( CMAKE_C_FLAGS "-g -Wall -O3 -m64" )
set( CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS} )
#cmake cross build find_library to find in this directory
set(CMAKE_MACOSX_RPATH TRUE)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
#Qt Tools
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
#others
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
set(BUILD_SHARED_LIBS ON)
2017-09-14 17:41:45 +08:00
set(CMAKE_VERBOSE_MAKEFILE OFF )
2017-09-17 08:46:57 +08:00
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
#set ( CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/build.cmake )
2017-09-05 18:07:05 +08:00
project(App0OnQQt)
2017-09-14 17:41:45 +08:00
set( ${PROJECT_NAME}_VERSION_MAJOR 1)
set( ${PROJECT_NAME}_VERSION_MINOR 0)
set(QT5 TRUE)
add_definitions( -D__QT5__ -DUNICODE )
IF (WIN32)
add_definitions( -D__WIN__ )
ELSEIF (APPLE)
add_definitions( -D__DARWIN__ )
ELSEIF (UNIX)
add_definitions( -D__LINUX__ )
ENDIF ()
2017-09-05 18:07:05 +08:00
add_subdirectory( src )
add_subdirectory( examples/qqtframe )
2017-09-05 18:07:05 +08:00
#add_subdirectory( examples/animationframe )
#add_subdirectory( examples/cmdwidget )
#add_subdirectory( examples/console )
#add_subdirectory( examples/ffmpegplayer )
#add_subdirectory( examples/ftpclient )
#add_subdirectory( examples/httpclient )
#add_subdirectory( examples/liveplayer )
#add_subdirectory( examples/webkit )
2017-09-05 18:07:05 +08:00
#set ( CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/../../b1-Product/a0-qqtbased/Application)
2017-09-17 08:46:57 +08:00
if(APPLE)
set (CPACK_GENERATOR Bundle)
set (CPACK_BUNDLE_NAME "QQtFrame")
set (CPACK_BUNDLE_PLIST "info.plist")
set (CPACK_BUNDLE_ICON "app.ico")
INCLUDE (CPack)
endif(APPLE)