[Orxonox-commit 6640] r11278 - in code/branches/mac_HS16: . cmake cmake/tools src/external/tolua src/orxonox/worldentities

ahedges at orxonox.net ahedges at orxonox.net
Tue Nov 8 09:05:11 CET 2016


Author: ahedges
Date: 2016-11-08 09:05:10 +0100 (Tue, 08 Nov 2016)
New Revision: 11278

Added:
   code/branches/mac_HS16/cmake/CopyLibPhase.cmake
Removed:
   code/branches/mac_HS16/src/external/tolua/tolua++.h
Modified:
   code/branches/mac_HS16/CMakeLists.txt
   code/branches/mac_HS16/cmake/LibraryConfig.cmake
   code/branches/mac_HS16/cmake/PackageConfigOSX.cmake
   code/branches/mac_HS16/cmake/tools/FindCEGUI.cmake
   code/branches/mac_HS16/src/external/tolua/CMakeLists.txt
   code/branches/mac_HS16/src/orxonox/worldentities/Actionpoint.cc
Log:
comment out some stuff and update the cmake file for macOS 10.12


Modified: code/branches/mac_HS16/CMakeLists.txt
===================================================================
--- code/branches/mac_HS16/CMakeLists.txt	2016-11-07 16:08:11 UTC (rev 11277)
+++ code/branches/mac_HS16/CMakeLists.txt	2016-11-08 08:05:10 UTC (rev 11278)
@@ -142,20 +142,10 @@
 INSTALL(SCRIPT cmake/InstallCheck.cmake)
 
 IF(APPLE)
-  # Set 10.5 as the base SDK by default
-  SET(XCODE_ATTRIBUTE_SDKROOT macosx10.5)
-
-  # 10.6 sets x86_64 as the default architecture.
-  # Because Carbon isn't supported on 64-bit and we still need it, force the architectures to ppc and i386
-  IF(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
-    SET(CMAKE_OSX_ARCHITECTURES "i386")
-  ENDIF()
-  IF(CMAKE_OSX_ARCHITECTURES MATCHES "ppc64")
-    SET(CMAKE_OSX_ARCHITECTURES "ppc")
-  ENDIF()
-  IF(NOT CMAKE_OSX_ARCHITECTURES)
-    SET(CMAKE_OSX_ARCHITECTURES "i386")
-  ENDIF()
+  # Use the latest SDK and a minimum deployment target of Mountain Lion
+  SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.8")
+  set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
+  SET(CMAKE_OSX_ARCHITECTURES "x86_64")
 ENDIF()
 
 ########### Subfolders and Subscripts ###########
@@ -187,9 +177,13 @@
 # Last but not least: Try to make a doc target with Doxygen
 ADD_SUBDIRECTORY(doc)
 
+IF(APPLE)
+	INCLUDE(CopyLibPhase)
+ENDIF(APPLE)
+
 ########### CPack Packaging ###########
 
 # Currently only testing on Apple
-#IF(APPLE)
-#  INCLUDE(BundleConfig)
-#ENDIF(APPLE)
+# IF(APPLE)
+#   INCLUDE(BundleConfig)
+# ENDIF(APPLE)

Added: code/branches/mac_HS16/cmake/CopyLibPhase.cmake
===================================================================
--- code/branches/mac_HS16/cmake/CopyLibPhase.cmake	                        (rev 0)
+++ code/branches/mac_HS16/cmake/CopyLibPhase.cmake	2016-11-08 08:05:10 UTC (rev 11278)
@@ -0,0 +1,30 @@
+SET(DEP_INCLUDE_DIR   ${DEPENDENCY_PACKAGE_DIR}/include)
+SET(DEP_LIBRARY_DIR   ${DEPENDENCY_PACKAGE_DIR}/lib)
+SET(DEP_BINARY_DIR    ${DEPENDENCY_PACKAGE_DIR}/bin)
+SET(DEP_FRAMEWORK_DIR ${DEPENDENCY_PACKAGE_DIR}/Library/Frameworks)
+
+# Install on OSX
+foreach(target IN ITEMS ${CMAKE_CONFIGURATION_TYPES})
+    file(GLOB_RECURSE dep_frameworks FOLLOW_SYMLINKS "${DEP_FRAMEWORK_DIR}/*")
+    file(GLOB_RECURSE dep_libraries FOLLOW_SYMLINKS "${DEP_LIBRARY_DIR}/*")
+
+    foreach(p IN LISTS dep_frameworks)
+        STRING(REGEX REPLACE "${DEP_FRAMEWORK_DIR}" "" rel_p ${p})
+        configure_file(${p}
+        "${CMAKE_BINARY_DIR}/bin/${target}/Orxonox.app/Contents/Frameworks/${rel_p}" COPYONLY)
+    endforeach()
+
+    foreach(p IN LISTS dep_libraries)
+        STRING(REGEX REPLACE "${DEP_LIBRARY_DIR}" "" rel_p ${p})
+        configure_file(${p}
+        "${CMAKE_BINARY_DIR}/bin/${target}/Orxonox.app/Contents/Frameworks/${rel_p}" COPYONLY)
+    endforeach()
+
+    file(GLOB_RECURSE dep_plugins FOLLOW_SYMLINKS "${DEP_BINARY_DIR}/*")
+
+    foreach(p IN LISTS dep_plugins)
+        STRING(REGEX REPLACE "${DEP_BINARY_DIR}" "" rel_p ${p})
+        configure_file(${p}
+        "${CMAKE_BINARY_DIR}/bin/${target}/Orxonox.app/Contents/Plugins/${rel_p}" COPYONLY)
+    endforeach()
+endforeach()

Modified: code/branches/mac_HS16/cmake/LibraryConfig.cmake
===================================================================
--- code/branches/mac_HS16/cmake/LibraryConfig.cmake	2016-11-07 16:08:11 UTC (rev 11277)
+++ code/branches/mac_HS16/cmake/LibraryConfig.cmake	2016-11-08 08:05:10 UTC (rev 11278)
@@ -52,7 +52,7 @@
   IF(APPLE AND NOT EXISTS ${CMAKE_SOURCE_DIR}/dependencies)
     # Let CMake automatically download and extract the dependency package on Mac OS X
     # TODO: Handle download errors and always select newest package
-    SET(_dep_package_current "OrxonoxDeps_110428_2.0_OSX.tar.bz2")
+    SET(_dep_package_current "OrxonoxDeps_110530_3.0_OSX.tar.bz2")
     SET(_dep_package_url "http://svn.orxonox.net/ogre/apple/precompiled_dependencies")
     MESSAGE(STATUS "Downloading Mac OS X dependency package.")
     FILE(DOWNLOAD
@@ -158,9 +158,10 @@
 
 ##### Boost #####
 # Expand the next statement if newer boost versions are released
+SET(Boost_USE_MULTITHREADED OFF) # on newer version -mt is dropped
 SET(Boost_ADDITIONAL_VERSIONS 1.40 1.40.0 1.41 1.41.0 1.42 1.42.0 1.43 1.43.0
                               1.44 1.44.0 1.45 1.45.0 1.46 1.46.0 1.46.1 1.49.0
-                              1.53.0)
+                          1.53.0)
 FIND_PACKAGE(Boost 1.40 REQUIRED thread filesystem system date_time)
 # No auto linking, so this option is useless anyway
 MARK_AS_ADVANCED(Boost_LIB_DIAGNOSTIC_DEFINITIONS)
@@ -212,4 +213,3 @@
 #         for optional ones.
 # Note 2: Render systems are found automatically (at least one required)
 CHECK_OGRE_PLUGINS("Plugin_ParticleFX" "Plugin_CgProgramManager")
-

Modified: code/branches/mac_HS16/cmake/PackageConfigOSX.cmake
===================================================================
--- code/branches/mac_HS16/cmake/PackageConfigOSX.cmake	2016-11-07 16:08:11 UTC (rev 11277)
+++ code/branches/mac_HS16/cmake/PackageConfigOSX.cmake	2016-11-08 08:05:10 UTC (rev 11278)
@@ -25,11 +25,11 @@
 
 INCLUDE(CheckPackageVersion)
 
-CHECK_PACKAGE_VERSION(2.0)
+CHECK_PACKAGE_VERSION(3.0)
 
 IF(NOT _INTERNAL_PACKAGE_MESSAGE)
   MESSAGE(STATUS "Using library package for the dependencies.")
-  
+
   # The following shell script sets the appropriate install_names for our libraries
   # and therefore it must be run before anything else is set, dep-package-wise.
   IF(NOT EXISTS ${CMAKE_BINARY_DIR}/dep_pack_install_log.keep_me)
@@ -37,7 +37,7 @@
     EXECUTE_PROCESS(
       COMMAND ${DEPENDENCY_PACKAGE_DIR}/install_dependencies.sh
       WORKING_DIRECTORY ${DEPENDENCY_PACKAGE_DIR}
-      OUTPUT_FILE ${CMAKE_BINARY_DIR}/dep_pack_install_log.keep_me 
+      OUTPUT_FILE ${CMAKE_BINARY_DIR}/dep_pack_install_log.keep_me
     )
   ENDIF()
   SET(_INTERNAL_PACKAGE_MESSAGE 1 CACHE INTERNAL "Do not edit!" FORCE)
@@ -61,13 +61,6 @@
 # Linking to OGRE requires linking to the boost threading library
 SET(OGRE_NEEDS_BOOST TRUE)
 
-# For OS X 10.5 we have to ship modified headers to make it compile
-# on gcc >= 4.2 (binaries stay the same)
-# Sets the library path for the FIND_LIBRARY
-IF(CMAKE_SYSTEM_VERSION STREQUAL "10.5")
-  SET(ENV{OPENALDIR} ${DEP_INCLUDE_DIR}/openal)
-ENDIF()
-
 ### INSTALL ###
 
 # Tcl script library
@@ -77,27 +70,3 @@
 #  DIRECTORY ${DEP_LIBRARY_DIR}/tcl/
 #  DESTINATION lib/tcl
 #)
-
-# TODO: Install on OSX
-IF(FALSE)
-  ## DEBUG
-  # When installing a debug version, we really can't know which libraries
-  # are used in released mode because there might be deps of deps.
-  # --> Copy all of them, except the debug databases
-  INSTALL(
-    DIRECTORY ${DEP_BINARY_DIR}/
-    DESTINATION bin
-    CONFIGURATIONS Debug
-    REGEX "^.*\\.pdb$" EXCLUDE
-  )
-
-  ## RELEASE
-  # Try to filter out all the debug libraries. If the regex doesn't do the
-  # job anymore, simply adjust it.
-  INSTALL(
-    DIRECTORY ${DEP_BINARY_DIR}/
-    DESTINATION bin
-    CONFIGURATIONS RelForDevs Release RelWithDebInfo MinSizeRel
-    REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE
-  )
-ENDIF()

Modified: code/branches/mac_HS16/cmake/tools/FindCEGUI.cmake
===================================================================
--- code/branches/mac_HS16/cmake/tools/FindCEGUI.cmake	2016-11-07 16:08:11 UTC (rev 11277)
+++ code/branches/mac_HS16/cmake/tools/FindCEGUI.cmake	2016-11-08 08:05:10 UTC (rev 11278)
@@ -12,7 +12,7 @@
 #  ENV{CEGUIDIR}, CEGUI path, optional
 #
 # Created by Matt Williams to find OGRE libraries
-# Copyright © 2007, Matt Williams
+# Copyright © 2007, Matt Williams
 #
 # Modified by Nicolas Schlumberger to find CEGUI libraries
 # and make it run on the Tardis-Infrastucture of the ETH Zurich
@@ -90,6 +90,9 @@
   PATH_SUFFIXES lib bin
 )
 
+MESSAGE("Looking for ceguitolua++")
+MESSAGE(${DEP_INCLUDE_DIR})
+
 # Find CEGUI Tolua++ include file
 # We only need to add this path since we use tolua++ like a normal
 # dependency but it is shipped with CEGUILua.
@@ -98,9 +101,7 @@
     ${CEGUILUA_INCLUDE_DIR}
     # For newer CEGUI versions >= 0.7
     ${CEGUILUA_INCLUDE_DIR}/support/tolua++
-    ${DEP_INCLUDE_DIR}/tolua++/include
-    # For Mac OS X, tolua++ is a separate framework in the dependency package
-    ${DEP_FRAMEWORK_DIR}
+    ${DEP_INCLUDE_DIR}/tolua++
   NO_DEFAULT_PATH # Don't attempt to find tolua++ installed on the system
 )
 # Find CEGUI Tolua++ libraries

Modified: code/branches/mac_HS16/src/external/tolua/CMakeLists.txt
===================================================================
--- code/branches/mac_HS16/src/external/tolua/CMakeLists.txt	2016-11-07 16:08:11 UTC (rev 11277)
+++ code/branches/mac_HS16/src/external/tolua/CMakeLists.txt	2016-11-08 08:05:10 UTC (rev 11278)
@@ -34,7 +34,6 @@
 SET(TOLUA_PARSER_SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/all-5.1.lua" CACHE INTERNAL "")
 SET(TOLUA_PARSER_DEPENDENCIES
   toluaapp_orxonox
-  ${CMAKE_CURRENT_SOURCE_DIR}/tolua++.h
   ${CMAKE_CURRENT_SOURCE_DIR}/all-5.1.lua
   ${CMAKE_CURRENT_SOURCE_DIR}/lua/compat-5.1.lua
   ${CMAKE_CURRENT_SOURCE_DIR}/lua/compat.lua

Deleted: code/branches/mac_HS16/src/external/tolua/tolua++.h
===================================================================
--- code/branches/mac_HS16/src/external/tolua/tolua++.h	2016-11-07 16:08:11 UTC (rev 11277)
+++ code/branches/mac_HS16/src/external/tolua/tolua++.h	2016-11-08 08:05:10 UTC (rev 11278)
@@ -1,186 +0,0 @@
-/* tolua
-** Support code for Lua bindings.
-** Written by Waldemar Celes
-** TeCGraf/PUC-Rio
-** Apr 2003
-** $Id: $
-*/
-
-/* This code is free software; you can redistribute it and/or modify it.
-** The software provided hereunder is on an "as is" basis, and
-** the author has no obligation to provide maintenance, support, updates,
-** enhancements, or modifications.
-*/
-
-
-#ifndef TOLUA_H
-#define TOLUA_H
-
-#ifndef TOLUA_API
-#define TOLUA_API extern
-#endif
-
-#define TOLUA_VERSION "tolua++-1.0.92"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define tolua_pushcppstring(x,y)	tolua_pushstring(x,y.c_str())
-#define tolua_iscppstring	tolua_isstring
-
-#define tolua_iscppstringarray tolua_isstringarray
-#define tolua_pushfieldcppstring(L,lo,idx,s) tolua_pushfieldstring(L, lo, idx, s.c_str())
-
-#ifndef TEMPLATE_BIND
- #define TEMPLATE_BIND(p)
-#endif
-
-#define TOLUA_TEMPLATE_BIND(p)
-
-#define TOLUA_PROTECTED_DESTRUCTOR
-#define TOLUA_PROPERTY_TYPE(p)
-
-typedef int lua_Object;
-
-#include "lua.h"
-#include "lauxlib.h"
-
-struct tolua_Error
-{
-	int index;
-	int array;
-	const char* type;
-};
-typedef struct tolua_Error tolua_Error;
-
-#define TOLUA_NOPEER	LUA_REGISTRYINDEX /* for lua 5.1 */
-
-TOLUA_API const char* tolua_typename (lua_State* L, int lo);
-TOLUA_API void tolua_error (lua_State* L, const char* msg, tolua_Error* err);
-TOLUA_API int tolua_isnoobj (lua_State* L, int lo, tolua_Error* err);
-TOLUA_API int tolua_isvalue (lua_State* L, int lo, int def, tolua_Error* err);
-TOLUA_API int tolua_isvaluenil (lua_State* L, int lo, tolua_Error* err);
-TOLUA_API int tolua_isboolean (lua_State* L, int lo, int def, tolua_Error* err);
-TOLUA_API int tolua_isnumber (lua_State* L, int lo, int def, tolua_Error* err);
-TOLUA_API int tolua_isstring (lua_State* L, int lo, int def, tolua_Error* err);
-TOLUA_API int tolua_istable (lua_State* L, int lo, int def, tolua_Error* err);
-TOLUA_API int tolua_isusertable (lua_State* L, int lo, const char* type, int def, tolua_Error* err);
-TOLUA_API int tolua_isuserdata (lua_State* L, int lo, int def, tolua_Error* err);
-TOLUA_API int tolua_isusertype (lua_State* L, int lo, const char* type, int def, tolua_Error* err);
-TOLUA_API int tolua_isvaluearray
- (lua_State* L, int lo, int dim, int def, tolua_Error* err);
-TOLUA_API int tolua_isbooleanarray
- (lua_State* L, int lo, int dim, int def, tolua_Error* err);
-TOLUA_API int tolua_isnumberarray
- (lua_State* L, int lo, int dim, int def, tolua_Error* err);
-TOLUA_API int tolua_isstringarray
- (lua_State* L, int lo, int dim, int def, tolua_Error* err);
-TOLUA_API int tolua_istablearray
- (lua_State* L, int lo, int dim, int def, tolua_Error* err);
-TOLUA_API int tolua_isuserdataarray
- (lua_State* L, int lo, int dim, int def, tolua_Error* err);
-TOLUA_API int tolua_isusertypearray
- (lua_State* L, int lo, const char* type, int dim, int def, tolua_Error* err);
-
-TOLUA_API void tolua_open (lua_State* L);
-
-TOLUA_API void* tolua_copy (lua_State* L, void* value, unsigned int size);
-TOLUA_API int tolua_register_gc (lua_State* L, int lo);
-TOLUA_API int tolua_default_collect (lua_State* tolua_S);
-
-TOLUA_API void tolua_usertype (lua_State* L, const char* type);
-TOLUA_API void tolua_beginmodule (lua_State* L, const char* name);
-TOLUA_API void tolua_endmodule (lua_State* L);
-TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar);
-TOLUA_API void tolua_class (lua_State* L, const char* name, const char* base);
-TOLUA_API void tolua_cclass (lua_State* L, const char* lname, const char* name, const char* base, lua_CFunction col);
-TOLUA_API void tolua_function (lua_State* L, const char* name, lua_CFunction func);
-TOLUA_API void tolua_constant (lua_State* L, const char* name, lua_Number value);
-TOLUA_API void tolua_variable (lua_State* L, const char* name, lua_CFunction get, lua_CFunction set);
-TOLUA_API void tolua_array (lua_State* L,const char* name, lua_CFunction get, lua_CFunction set);
-
-/* TOLUA_API void tolua_set_call_event(lua_State* L, lua_CFunction func, char* type); */
-/* TOLUA_API void tolua_addbase(lua_State* L, char* name, char* base); */
-
-TOLUA_API void tolua_pushvalue (lua_State* L, int lo);
-TOLUA_API void tolua_pushboolean (lua_State* L, int value);
-TOLUA_API void tolua_pushnumber (lua_State* L, lua_Number value);
-TOLUA_API void tolua_pushstring (lua_State* L, const char* value);
-TOLUA_API void tolua_pushuserdata (lua_State* L, void* value);
-TOLUA_API void tolua_pushusertype (lua_State* L, void* value, const char* type);
-TOLUA_API void tolua_pushusertype_and_takeownership(lua_State* L, void* value, const char* type);
-TOLUA_API void tolua_pushfieldvalue (lua_State* L, int lo, int index, int v);
-TOLUA_API void tolua_pushfieldboolean (lua_State* L, int lo, int index, int v);
-TOLUA_API void tolua_pushfieldnumber (lua_State* L, int lo, int index, lua_Number v);
-TOLUA_API void tolua_pushfieldstring (lua_State* L, int lo, int index, const char* v);
-TOLUA_API void tolua_pushfielduserdata (lua_State* L, int lo, int index, void* v);
-TOLUA_API void tolua_pushfieldusertype (lua_State* L, int lo, int index, void* v, const char* type);
-TOLUA_API void tolua_pushfieldusertype_and_takeownership (lua_State* L, int lo, int index, void* v, const char* type);
-
-TOLUA_API lua_Number tolua_tonumber (lua_State* L, int narg, lua_Number def);
-TOLUA_API const char* tolua_tostring (lua_State* L, int narg, const char* def);
-TOLUA_API void* tolua_touserdata (lua_State* L, int narg, void* def);
-TOLUA_API void* tolua_tousertype (lua_State* L, int narg, void* def);
-TOLUA_API int tolua_tovalue (lua_State* L, int narg, int def);
-TOLUA_API int tolua_toboolean (lua_State* L, int narg, int def);
-TOLUA_API lua_Number tolua_tofieldnumber (lua_State* L, int lo, int index, lua_Number def);
-TOLUA_API const char* tolua_tofieldstring (lua_State* L, int lo, int index, const char* def);
-TOLUA_API void* tolua_tofielduserdata (lua_State* L, int lo, int index, void* def);
-TOLUA_API void* tolua_tofieldusertype (lua_State* L, int lo, int index, void* def);
-TOLUA_API int tolua_tofieldvalue (lua_State* L, int lo, int index, int def);
-TOLUA_API int tolua_getfieldboolean (lua_State* L, int lo, int index, int def);
-
-TOLUA_API void tolua_dobuffer(lua_State* L, char* B, unsigned int size, const char* name);
-
-TOLUA_API int class_gc_event (lua_State* L);
-
-#ifdef __cplusplus
-static inline const char* tolua_tocppstring (lua_State* L, int narg, const char* def) {
-
-	const char* s = tolua_tostring(L, narg, def);
-	return s?s:"";
-};
-
-static inline const char* tolua_tofieldcppstring (lua_State* L, int lo, int index, const char* def) {
-
-	const char* s = tolua_tofieldstring(L, lo, index, def);
-	return s?s:"";
-};
-
-#else
-#define tolua_tocppstring tolua_tostring
-#define tolua_tofieldcppstring tolua_tofieldstring
-#endif
-
-TOLUA_API int tolua_fast_isa(lua_State *L, int mt_indexa, int mt_indexb, int super_index);
-
-#ifndef Mtolua_new
-#define Mtolua_new(EXP) new EXP
-#endif
-
-#ifndef Mtolua_delete
-#define Mtolua_delete(EXP) delete EXP
-#endif
-
-#ifndef Mtolua_new_dim
-#define Mtolua_new_dim(EXP, len) new EXP[len]
-#endif
-
-#ifndef Mtolua_delete_dim
-#define Mtolua_delete_dim(EXP) delete [] EXP
-#endif
-
-#ifndef tolua_outside
-#define tolua_outside
-#endif
-
-#ifndef tolua_owned
-#define tolua_owned
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif

Modified: code/branches/mac_HS16/src/orxonox/worldentities/Actionpoint.cc
===================================================================
--- code/branches/mac_HS16/src/orxonox/worldentities/Actionpoint.cc	2016-11-07 16:08:11 UTC (rev 11277)
+++ code/branches/mac_HS16/src/orxonox/worldentities/Actionpoint.cc	2016-11-08 08:05:10 UTC (rev 11278)
@@ -30,11 +30,11 @@
 
 namespace orxonox
 {
-    RegisterClass(Actionpoint);
+//    RegisterClass(Actionpoint); ?
 
     Actionpoint::Actionpoint(Context* context) : StaticEntity(context)
     {
-        RegisterObject(Actionpoint);
+//        RegisterObject(Actionpoint);
         
         this->actionName_ = "";
         this->name_ = "";




More information about the Orxonox-commit mailing list