Explorar o código

Initial framework install. Doesn't copy dependencies.

Cameron Hart %!s(int64=14) %!d(string=hai) anos
pai
achega
1a4c2bed04

+ 8 - 1
CMakeLists.txt

@@ -15,11 +15,14 @@ OPTION(POLYCODE_BUILD_MODULES "Build Polycode modules" ON)
 OPTION(POLYCODE_BUILD_PLAYER "Build Polycode standalone player" ON)
 OPTION(POLYCODE_BUILD_TOOLS "Build Polycode tools" ON)
 
+OPTION(POLYCODE_INSTALL_FRAMEWORK "Install Polycode Core, Modules and Tools" ON)
+
 # Some non-standard CMake modules
 SET(CMAKE_MODULE_PATH ${PolyCode_SOURCE_DIR}/Core/Build/CMake ${CMAKE_MODULE_PATH})
 
 IF(WIN32)
     SET(CMAKE_PREFIX_PATH ${PolyCode_SOURCE_DIR}/Release/Win/Framework/Dependencies)
+    SET(CMAKE_SYSTEM_LIBRARY_PATH ${CMAKE_PREFIX_PATH}/Lib/Release)
 ENDIF(WIN32)
 
 FIND_PACKAGE(PhysFS REQUIRED)
@@ -36,7 +39,7 @@ ENDIF(UNIX AND NOT APPLE)
 
 FIND_LIBRARY(VORBISFILE_LIBRARY NAMES vorbisfile)
 
-# platform specific include directories for win and sdl
+# platform specific defines and include directories for win and sdl
 IF(MSVC)
     ADD_DEFINITIONS(/D_UNICODE /DUNICODE)
     INCLUDE_DIRECTORIES(${PolyCode_SOURCE_DIR}/Core/Build/MSVC/Polycore)
@@ -47,6 +50,7 @@ ELSE(MSVC)
     INCLUDE_DIRECTORIES(${PolyCode_SOURCE_DIR}/Core/Build/Linux)
 ENDIF(MSVC)
 
+# Set up common include directories
 INCLUDE_DIRECTORIES(
     ${PolyCode_SOURCE_DIR}/Core/Contents/Include
     ${OPENGL_INCLUDE_DIR}
@@ -54,6 +58,7 @@ INCLUDE_DIRECTORIES(
     ${FREETYPE_INCLUDE_DIRS}
 )
 
+# Process subdirectories
 ADD_SUBDIRECTORY(Core/Contents)
 
 IF(POLYCODE_BUILD_BINDINGS)
@@ -80,3 +85,5 @@ IF(POLYCODE_BUILD_TOOLS)
     FIND_PACKAGE(Assimp REQUIRED)
     ADD_SUBDIRECTORY(Tools/Contents)
 ENDIF(POLYCODE_BUILD_TOOLS)
+
+# Install assets and dependencies

+ 1 - 1
Core/Build/CMake/FindFreetype.cmake

@@ -70,7 +70,7 @@ FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
 )
 
 FIND_LIBRARY(FREETYPE_LIBRARY
-  NAMES freetype libfreetype freetype219 freetype245
+  NAMES freetype libfreetype freetype219 freetype244mt freetype245
   HINTS
   $ENV{FREETYPE_DIR}
   PATH_SUFFIXES lib64 lib

+ 17 - 0
Core/Contents/CMakeLists.txt

@@ -217,3 +217,20 @@ IF(POLYCODE_BUILD_STATIC)
     ADD_LIBRARY(PolyCore_static ${polycore_SRCS} ${polycore_HDRS})
 ENDIF(POLYCODE_BUILD_STATIC)
 
+IF(POLYCODE_INSTALL_FRAMEWORK)
+    # install headers
+    INSTALL(FILES ${polycore_HDRS} DESTINATION Framework/Core/Include)
+
+    # install libraries
+    IF(POLYCODE_BUILD_SHARED)
+        INSTALL(TARGETS PolyCore EXPORT PolyCore-targets DESTINATION Framework/Core/Lib/${CMAKE_BUILD_TYPE})
+    ENDIF()
+    IF(POLYCODE_BUILD_STATIC)
+        INSTALL(TARGETS PolyCore_static EXPORT PolyCore-targets DESTINATION Framework/Core/Lib/${CMAKE_BUILD_TYPE})
+    ENDIF()
+
+    # from Box2D's cmake file - not sure what it does yet
+    # install build system hooks for third-party apps
+    # INSTALL(EXPORT PolyCore-targets DESTINATION Lib/Box2D)
+    # INSTALL(FILES Box2DConfig.cmake DESTINATION Lib/Box2D)
+ENDIF(POLYCODE_INSTALL_FRAMEWORK)

BIN=BIN
Player/Build/MSVC/PolycodePlayer/PolycodePlayer.suo


BIN=BIN
Tools/Build/MSVC/Tools/Tools.suo