#------------------------------------------------------------------- # This file is part of the CMake build system for Scol # # The contents of this file are placed in the public domain. Feel # free to make use of it in any way you like. #------------------------------------------------------------------- ###################################################################### # Scol BUILD SYSTEM # Welcome to the CMake build system for Scol. # Inspired from the Ogre build system (modules FindPkgMacros.cmake, # PrecompiledHeader.cmake and PreprocessorUtils.cmake are Ogre's ones) # and provide build configuration options. # This is the main file where we prepare the general build environment ###################################################################### ###################################################################### # What i want is: # * One global visual studio file, preparing all the stuff needed to # generate the installer. # * One visual studio solution file by vm, and one solution file by # plugin. ###################################################################### cmake_minimum_required (VERSION 3.5) cmake_policy(SET CMP0003 NEW) cmake_policy(SET CMP0007 OLD) cmake_policy(SET CMP0017 OLD) cmake_policy(SET CMP0053 OLD) project(Scol) # determine if we are compiling for a 32bit or 64bit system include(CheckTypeSize) CHECK_TYPE_SIZE("void*" SCOLDEPS_PTR_SIZE BUILTIN_TYPES_ONLY) if (SCOLDEPS_PTR_SIZE EQUAL 8) set(SCOLDEPS_PLATFORM_X64 TRUE) else () set(SCOLDEPS_PLATFORM_X64 FALSE) endif () if (WIN32 AND SCOLDEPS_PLATFORM_X64) set (WIN64 TRUE) endif (WIN32 AND SCOLDEPS_PLATFORM_X64) # Include necessary submodules set(CMAKE_MODULE_PATH "${Scol_SOURCE_DIR}/CMake" "${Scol_SOURCE_DIR}/CMake/Utils" ) # CMake includes: include(CMakeDependentOption) include(CheckCXXCompilerFlag) include(PreprocessorUtils) include(ScolMacroLogFeature) include(ScolConfigTargets) set(Scol_TEMPLATES_DIR "${Scol_SOURCE_DIR}/CMake/Templates") set(Scol_WORK_DIR ${Scol_BINARY_DIR}) if(WIN32) OPTION(SO3_USE_DX11 "USE DIRECTX11 ON WINDOWS" TRUE) OPTION(SO3_USE_GL3 "USE OPENGL3 ON WINDOWS" FALSE) endif() ##################################################################### # Set up the basic build environment ##################################################################### set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) if (NOT WIN32) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-write-strings") endif () if (CMAKE_BUILD_TYPE STREQUAL "") # CMake defaults to leaving CMAKE_BUILD_TYPE empty. This screws up # differentiation between debug and release builds. set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None (CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE) endif () if (ANDROID AND CMAKE_BUILD_TYPE STREQUAL "Debug") unset(CMAKE_STRIP) endif() if (APPLE_IOS) add_definitions("-DAPPLE_IOS") endif() # determine Scol version numbers include(ScolGetVersion) scol_get_version(${Scol_SOURCE_DIR}/vm/kernel5/include/common/vscol.h) message(STATUS "Configuring Scol ${Scol_VERSION}") if (NOT APPLE) # Create debug libraries with no postfix set(CMAKE_DEBUG_POSTFIX "") endif () # Figure out which type we could use to store pointers. This is used to generate kernel_config.h in Scol VM. include(CheckTypeSize) # If intptr_t is defined we will use it for SCOL_PTR_TYPE check_type_size("intptr_t" INTPTR_T_SIZE) # If we can't use intptr_t, we'll try with intmax_t check_type_size("void*" VOID_PTR_SIZE BUILTIN_TYPES_ONLY) check_type_size("void (*)()" FUNC_PTR_SIZE BUILTIN_TYPES_ONLY) check_type_size("intmax_t" INTMAX_T_SIZE) if (HAVE_INTPTR_T_SIZE) message(STATUS "Using intptr_t for SCOL_PTR_TYPE") set(SCOL_PTR_SIZE INTPTR_T_SIZE) elseif (HAVE_INTMAX_T_SIZE) message(STATUS "Using intmax_t for SCOL_PTR_TYPE") set(SCOL_PTR_SIZE INTMAX_T_SIZE) else() message(FATAL_ERROR "Neither intptr_t or intmax_t exist, we can't store a pointer") endif() # If size is 0, it means we'll know only at compile time (which is why we have a preprocessor check that does the same thing) if (NOT SCOL_PTR_SIZE EQUAL 0) if (VOID_PTR_SIZE GREATER SCOL_PTR_SIZE OR FUNC_PTR_SIZE GREATER SCOL_PTR_SIZE) message(FATAL_ERROR "SCOL_PTR_TYPE is too small to hold data and/or function pointers") endif() endif() # Set compiler specific build flags if (MSVC AND NOT ANDROID) add_definitions(/fp:fast) SET(CMAKE_EXE_LINKER_FLAGS "/LARGEADDRESSAWARE") SET(CMAKE_MODULE_LINKER_FLAGS "/LARGEADDRESSAWARE") SET(CMAKE_STATIC_LINKER_FLAGS "/LARGEADDRESSAWARE") SET(CMAKE_SHARED_LINKER_FLAGS "/LARGEADDRESSAWARE") endif () if (CMAKE_COMPILER_IS_GNUCXX) # check_cxx_compiler_flag(-msse SCOL_GCC_HAS_SSE) # if (SCOL_GCC_HAS_SSE) # add_definitions(-msse) # endif () # Fix x64 issues on Linux if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" AND NOT APPLE) add_definitions(-fPIC) endif() endif (CMAKE_COMPILER_IS_GNUCXX) # Add Main include path (will be used by plugins, this system replace the original Scol_SDK). include_directories("${Scol_SOURCE_DIR}/vm/kernel5/include/" "${Scol_BINARY_DIR}/vm/kernel5/include/") #default options if (APPLE OR APPLE_IOS OR RPI OR UNIX AND NOT ANDROID) option ("Scol_STATIC" "Build scol plugins in static" ON) else() option ("Scol_STATIC" "Build scol plugins in static" OFF) endif() # These variables are used to link scol plugins statically into the Scol executable. # Reset them at every CMake run to avoid issues when the configuration is changed. if (Scol_STATIC) set(SCOL_LIBRARIES "" CACHE INTERNAL "" FORCE) set(SCOL_INCLUDES "" CACHE INTERNAL "" FORCE) set(SCOL_PREPROCESSOR "" CACHE INTERNAL "" FORCE) endif (Scol_STATIC) option ("OpenCV_STATIC" "Use static OpenCV" ON) option ("OGRE_STATIC" "Use static Ogre3D" ON) # Find dependencies include(ScolDependencies) # Specify build paths # On iOS, we want CMake to handle them automatically to prevent install issues if (NOT APPLE_IOS) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${Scol_BINARY_DIR}/lib") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${Scol_BINARY_DIR}/lib") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${Scol_BINARY_DIR}/bin") endif() # We don't want to install in default system location, install is really for the SDK, so call it for that if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) if (WIN64) set(CMAKE_INSTALL_PREFIX "${Scol_SOURCE_DIR}/../scol_sdk/x64" CACHE PATH "Scol install prefix" FORCE) elseif (WIN32) set(CMAKE_INSTALL_PREFIX "${Scol_SOURCE_DIR}/../scol_sdk/x86" CACHE PATH "Scol install prefix" FORCE) elseif(APPLE AND NOT APPLE_IOS) set(CMAKE_INSTALL_PREFIX "${Scol_SOURCE_DIR}/../scol_sdk/OSX" CACHE PATH "Scol install prefix" FORCE) elseif(APPLE AND APPLE_IOS) set(CMAKE_INSTALL_PREFIX "${Scol_SOURCE_DIR}/../scol_sdk/IOS" CACHE PATH "Scol install prefix" FORCE) elseif(PIZERO) set(CMAKE_INSTALL_PREFIX "${Scol_SOURCE_DIR}/../scol_sdk/RPIZERO" CACHE PATH "Scol install prefix" FORCE) elseif(PITHREE) set(CMAKE_INSTALL_PREFIX "${Scol_SOURCE_DIR}/../scol_sdk/RPI3" CACHE PATH "Scol install prefix" FORCE) elseif(PIFOUR) set(CMAKE_INSTALL_PREFIX "${Scol_SOURCE_DIR}/../scol_sdk/RPI4" CACHE PATH "Scol install prefix" FORCE) elseif(RPI) set(CMAKE_INSTALL_PREFIX "${Scol_SOURCE_DIR}/../scol_sdk/RPI2" CACHE PATH "Scol install prefix" FORCE) elseif(SCOL_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX "${Scol_SOURCE_DIR}/../scol_sdk/${SCOL_INSTALL_PREFIX}" CACHE PATH "Scol install prefix" FORCE) else() set(CMAKE_INSTALL_PREFIX "${Scol_SOURCE_DIR}/../scol_sdk/linux" CACHE PATH "Scol install prefix" FORCE) endif() endif (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) ###################################################################### # Provide user options to customise the build process ###################################################################### # Customise what to install if (WIN32) cmake_dependent_option(Scol_DEBUG_MEMORY_LEAKS "Use Visual Leak Debugger to debug memory leaks" FALSE "VisualLeakDetector_FOUND" FALSE) cmake_dependent_option(Scol_INSTALL_PDB "Install debug pdb files" FALSE "MSVC" FALSE) endif () cmake_dependent_option(Scol_BUILD_WITH_QT "Build 2D library using QT" FALSE "Qt5Widgets_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_WITH_SDL "Build 2D library using SDL2" FALSE "SDL2_FOUND" FALSE) # temporary for android if (WIN32) option(Scol_BUILD_LIB2D "Build lib 2d 'graphics' plugin" TRUE) option(Scol_BUILD_WSYSTEM "Build wsystem plugin, contains some utils for powering down Windows OS" TRUE) option(Scol_BUILD_XTENSION "Build xtension plugin, activeX loading in a scol window" TRUE) cmake_dependent_option(Scol_BUILD_GLOVE_5DT "Build Glove 5DT plugin" TRUE "Glove5DT_FOUND" FALSE) option(Scol_BUILD_TEMPLATE_PLUGIN "Build a sample scol plugin, for learning how to make your own scol plugin!" FALSE) option(Scol_BUILD_NONIN "Build Nonin's WristOx2 plugin, a medical pulse/oxymeter" TRUE) cmake_dependent_option(Scol_BUILD_VUZIX "Build Vuzix HMD head tracker plugin" TRUE "Vuzix_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_RESPIRATION_BELT "Build respiration belt plugin, a medical captor" TRUE "TUsb_FOUND;Boost_FOUND;Boost_THREAD_FOUND;Boost_DATE_TIME_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_NEUROSKY "Build Neurosky plugin, a neural headset captor" TRUE "NEUROSKY_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_SPACEPOINTFUSION "Build space point fusion plugin, a low cost 3d gyroscopic captor" TRUE "WDK_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_WIIMOTE "Build wiimote plugin, wii controller support." TRUE "WDK_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_OPTITRACK "Build OptiTrack plugin, OptiTrack infrared cameras support." TRUE "OptiTrack_FOUND;Boost_FOUND;Boost_THREAD_FOUND;Boost_DATE_TIME_FOUND" FALSE) option(Scol_BUILD_SQL "Build sql plugin, SQL databases access" TRUE) option(Scol_BUILD_USB_UIRT "Build UsbUirt plugin, permits interfacing with ir emitter" TRUE) cmake_dependent_option(Scol_BUILD_OPEN_NI "Build OpenNi plugin, Kinect support" TRUE "OpenNi_FOUND;NITE_FOUND;OpenCV_FOUND;Boost_FOUND;Boost_THREAD_FOUND;Boost_DATE_TIME_FOUND" FALSE) #cmake_dependent_option(Scol_BUILD_VLC "Build Vlc plugin, video player." FALSE "Vlc_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_EYE_TRACKING "Build eye tracking plugin, using SMI eye trackers solution." FALSE "IViewX_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_MMEDIA "Build MMedia plugin, quicktime/realplayer/windows media player formats support." FALSE "DSound_FOUND;Quicktime_FOUND" FALSE) #cmake_dependent_option(Scol_BUILD_OCULUS "Build OCULUS plugin, OCULUS library." FALSE "OCULUS_FOUND;Boost_FOUND;Boost_THREAD_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_SOPENVR "Build SOPENVR plugin, OPENVR library." TRUE "OPENVR_FOUND;Boost_FOUND;Boost_THREAD_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_SOPENXR "Build SOPENXR plugin, OPENXR library." TRUE "OpenXR_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_TOBII "Build TOBII plugin, TOBII library." TRUE "TOBII_FOUND;Boost_FOUND;Boost_THREAD_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_LEAPMOTION "Build LEAPMOTION plugin, LEAPMOTION library." TRUE "LEAPMOTION_FOUND;Boost_FOUND;Boost_THREAD_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_MYO "Build MYO plugin, MYO library." TRUE "MYO_FOUND;Boost_FOUND;Boost_THREAD_FOUND" FALSE) option(Scol_BUILD_SYSPACK "Build Syspack plugin, extended system api" FALSE) option(Scol_BUILD_SCIENCE "Build Science plugin, scientific api" FALSE) cmake_dependent_option(Scol_BUILD_ANDROIDDEPLOYER "Build AndroidDeployer plugin, AndroidDeployer library" TRUE "Boost_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_RUDDER3D "Build 3dRudder plugin, a VR controller." TRUE "RUDDER3D_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_EMOTIV "Build Emotiv plugin, a EEG reader headset." TRUE "EMOTIV_FOUND" FALSE) option(Scol_BUILD_X10 "Build x10 plugin, an home automation protocol" TRUE) if (NOT WIN64) cmake_dependent_option(Scol_BUILD_ZOO_ENGINE "Build Zoo engine plugin, the old 3D engine (deprecated, replaced with SO3Engine)" TRUE "DSound_FOUND;ZLIB_FOUND;PNG_FOUND;OPENGL_FOUND;" FALSE) endif() endif(WIN32) # Common if (NOT APPLE) cmake_dependent_option(Scol_BUILD_SCURL "Build CURL plugin, network library." TRUE "CURL_FOUND;OPENSSL_FOUND;Boost_FOUND;Boost_THREAD_FOUND" FALSE) else() # On iOS and OSX, we use DarwinSSL (bundled with the system) instead of OpenSSL cmake_dependent_option(Scol_BUILD_SCURL "Build CURL plugin, network library." TRUE "CURL_FOUND;Boost_FOUND;Boost_THREAD_FOUND" FALSE) endif() cmake_dependent_option(Scol_BUILD_SPEECH "Build voice recognition and text to speech plugin" TRUE "vosk_FOUND;piper_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_STUIO "Build TUIO plugin, Tuio library." TRUE "TUIO_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_SVRPN "Build VRPN plugin, VRPN library." TRUE "VRPN_FOUND;Boost_FOUND;Boost_THREAD_FOUND" FALSE) option(Scol_BUILD_SECURITY "Build security plugin, encryption/decryption tools" TRUE) option(Scol_BUILD_SXML "Build sXml plugin, Xml api" TRUE) option(Scol_BUILD_SQLITE3 "Build Sqlite3 plugin, sqlite3 database access" TRUE) cmake_dependent_option(Scol_BUILD_SERIAL_IO "Build serial io plugin, read/write on serial port" TRUE "Boost_FOUND;Boost_THREAD_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_AUDIO "Build audio plugin" TRUE "cAudio_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_LIB2D_OS "Build Lib 2D OS plugin" TRUE "PNG_FOUND;JPEG_FOUND;ZLIB_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_SENSOR "Build Sensor plugin" TRUE "Boost_FOUND;Boost_THREAD_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_SPDF "Build SPDF plugin, SPDF library." TRUE "LibHaru_FOUND;ZLIB_FOUND;PNG_FOUND" FALSE) if (WIN32) cmake_dependent_option(Scol_BUILD_BITMAP_TOOLKIT "Build BitmapToolkit plugin, images manipulation tools and AR markers detection." TRUE "ARToolKit_FOUND;Aruco_FOUND;OpenCV_FOUND;VIDEOINPUT_FOUND;Boost_FOUND;Boost_THREAD_FOUND;Boost_DATE_TIME_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_SO3ENGINE "Build SO3Engine plugin, 3D rendering engine using Ogre3D as renderer." TRUE "OGRE_FOUND;SKYX_FOUND;HYDRAX_FOUND;CEF_FOUND;NEWTON_FOUND;Boost_FOUND;Boost_THREAD_FOUND;Boost_FILESYSTEM_FOUND;" FALSE) cmake_dependent_option(Scol_BUILD_JOYPAD "Build Joypad plugin" TRUE "DIRECTINPUT_FOUND;Boost_FOUND;Boost_THREAD_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_WITH_CEF3 "Build Scol with CEF3 support in SO3Engine" TRUE "CEF_FOUND" FALSE) else() cmake_dependent_option(Scol_BUILD_BITMAP_TOOLKIT "Build BitmapToolkit plugin, images manipulation tools and AR markers detection." TRUE "ARToolKit_FOUND;Aruco_FOUND;OpenCV_FOUND;Boost_FOUND;Boost_THREAD_FOUND;Boost_DATE_TIME_FOUND" FALSE) cmake_dependent_option(Scol_BUILD_SO3ENGINE "Build SO3Engine plugin, 3D rendering engine using Ogre3D as renderer." TRUE "OGRE_FOUND;SKYX_FOUND;HYDRAX_FOUND;NEWTON_FOUND;Boost_FOUND;Boost_THREAD_FOUND;Boost_FILESYSTEM_FOUND;" FALSE) cmake_dependent_option(Scol_BUILD_JOYPAD "Build Joypad plugin" TRUE "Boost_FOUND;Boost_THREAD_FOUND" FALSE) endif() if (WIN32 OR RPI) option(Scol_BUILD_GPIO "Build GPIO plugin, Raspberry PI GPIO api" TRUE) endif() if (ANDROID AND ANDROID_ABI STREQUAL "arm64-v8a" OR WIN32) #option(Scol_BUILD_OCULUS_MOBILE "Build OCULUS MOBILE plugin" TRUE) cmake_dependent_option(Scol_BUILD_SOPENXR "Build SOPENXR plugin, OPENXR library." TRUE "OpenXR_FOUND" FALSE) endif() ################################################################### # configure global build settings based on selected build options ################################################################### include(ScolConfigureBuild) ################################################################## # Now setup targets ################################################################## set(Scol_ANDROID_DEPENDENCIES "" CACHE INTERNAL "" FORCE) set(Scol_ANDROID_SHARED_LIBS "" CACHE INTERNAL "" FORCE) # For static build, we need to setup the plugins first so that the VM sees them # Setup plugins projects add_subdirectory(plugins) # Setup Scol core project add_subdirectory(vm) if(APPLE AND NOT APPLE_IOS) # Bundle resources file(GLOB RESOURCE_FILES LIST_DIRECTORIES true "sdk/osx/resources/*") list(REMOVE_ITEM RESOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/sdk/osx/resources/.DS_Store") endif(APPLE AND NOT APPLE_IOS) # Setup UsmWin project if (WIN32) add_subdirectory(usmwin) elseif (APPLE AND NOT APPLE_IOS AND NOT ANDROID) add_subdirectory(usmosx) elseif ((RPI OR UNIX OR LINUX) AND NOT APPLE_IOS AND NOT ANDROID) add_subdirectory(usmunix) endif (WIN32) ################################################################### # Android project generation #if(ANDROID) # # include(AndroidMacros) # # set(ANDROID_APP_NAME "scol" CACHE STRING "Android App name") # set(ANDROID_PKG_NAME "org.imaginer.scol" CACHE STRING "Android Pkg name") # set(ANDROID_MOD_NAME "kernel") # # if (DEBUG) # set(ANDROID_DEBUG "true") # else() # set(ANDROID_DEBUG "false") # endif() # # set(ANDROID_RES_PATH "${CMAKE_SOURCE_DIR}/sdk/android/resources") # set(ANDROID_SRC_PATH "${CMAKE_SOURCE_DIR}/vm/kernel5/java") # set(ANDROID_SCREEN_MODE "landscape" CACHE STRING "Orientation policy of android device") # set_property(CACHE ANDROID_SCREEN_MODE PROPERTY STRINGS unspecified behind landscape portrait reverseLandscape reversePortrait sensorLandscape sensorPortrait userLandscape userPortrait sensor fullSensor nosensor user fullUser locked) # set(HAS_CODE "true") # set(MAIN_ACTIVITY "org.imaginer.scol.NativeWrap") # # if(ANDROID_NSIGHT) # set(NDKOUT "${CMAKE_BINARY_DIR}") # # file(REMOVE_RECURSE "${NDKOUT}/res") # file(REMOVE_RECURSE "${NDKOUT}/assets") # # file(COPY "${ANDROID_RES_PATH}/drawable-hdpi" DESTINATION "${NDKOUT}/res") # file(COPY "${ANDROID_RES_PATH}/drawable-ldpi" DESTINATION "${NDKOUT}/res") # file(COPY "${ANDROID_RES_PATH}/drawable-mdpi" DESTINATION "${NDKOUT}/res") # file(COPY "${ANDROID_RES_PATH}/drawable-xhdpi" DESTINATION "${NDKOUT}/res") # file(COPY "${ANDROID_RES_PATH}/usm.ini" DESTINATION "${NDKOUT}/assets") # file(COPY "${ANDROID_RES_PATH}/partition" DESTINATION "${NDKOUT}/assets") # file(COPY "${ANDROID_RES_PATH}/ogre_redist" DESTINATION "${NDKOUT}/assets") # # file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp "int main(int argc, char *argv[]){return 0;}") # # add_executable(scolLauncher ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp ${NDKOUT}/AndroidManifest.xml) # add_android_dependencies(scolLauncher) # create_android_templates() # add_dependencies(scolLauncher ${Scol_ANDROID_DEPENDENCIES}) # # else(ANDROID_NSIGHT) # set(NDKOUT "${CMAKE_BINARY_DIR}/App") # # file(REMOVE_RECURSE "${NDKOUT}/res") # file(REMOVE_RECURSE "${NDKOUT}/assets") # # file(COPY "${ANDROID_RES_PATH}/drawable-hdpi" DESTINATION "${NDKOUT}/res") # file(COPY "${ANDROID_RES_PATH}/drawable-ldpi" DESTINATION "${NDKOUT}/res") # file(COPY "${ANDROID_RES_PATH}/drawable-mdpi" DESTINATION "${NDKOUT}/res") # file(COPY "${ANDROID_RES_PATH}/drawable-xhdpi" DESTINATION "${NDKOUT}/res") # file(COPY "${ANDROID_RES_PATH}/usm.ini" DESTINATION "${NDKOUT}/assets") # file(COPY "${ANDROID_RES_PATH}/partition" DESTINATION "${NDKOUT}/assets") # file(COPY "${ANDROID_RES_PATH}/ogre_redist" DESTINATION "${NDKOUT}/assets") # # file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp "int x = 0;") # ADD_LIBRARY(scolDummy MODULE ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) # add_dependencies(scolDummy ${Scol_ANDROID_DEPENDENCIES}) # MESSAGE (WARNING "Scol Deps : ${Scol_ANDROID_DEPENDENCIES}") # create_android_proj(scolDummy) # # endif(ANDROID_NSIGHT) # # file(COPY "${ANDROID_SRC_PATH}/src" DESTINATION ${NDKOUT}) # #endif(ANDROID) ################################################################### ################################################################### # iOS project generation if (APPLE_IOS) # Bundle resources file(GLOB RESOURCE_FILES LIST_DIRECTORIES true "sdk/ios/resources/*") list(REMOVE_ITEM RESOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/sdk/ios/resources/.DS_Store") # Dummy file for executable (main() is in kernel lib) if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/scol_static_main_dummy.cpp) file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/scol_static_main_dummy.cpp "") endif() add_executable(scolLauncher ${CMAKE_CURRENT_BINARY_DIR}/scol_static_main_dummy.cpp ${RESOURCE_FILES} ) list(REMOVE_DUPLICATES SCOL_LIBRARIES) message(STATUS "Scol static libs : ${SCOL_LIBRARIES}") target_link_libraries(scolLauncher kernel ${SCOL_LIBRARIES}) set_target_properties(scolLauncher PROPERTIES OUTPUT_NAME scol MACOSX_BUNDLE TRUE MACOSX_BUNDLE_BUNDLE_NAME scol RESOURCE "${RESOURCE_FILES}" # Qt doesn't use bitcode, so we can't use it here either. XCODE_ATTRIBUTE_ENABLE_BITCODE "NO" # Always generate debug symbols to help debugging XCODE_ATTRIBUTE_GCC_GENERATE_DEBUGGING_SYMBOLS "YES" ) scol_config_exe(scolLauncher) endif(APPLE_IOS) ###################################################################