From 7050ae5a3d17ad5f1fa653b6a8983e03a2cc59b4 Mon Sep 17 00:00:00 2001 From: kimmi Date: Sat, 27 Feb 2010 12:00:00 +0000 Subject: [PATCH] - UPDATE : Add Install target to CMake build. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@556 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- CMakeLists.txt | 5 ++++ code/CMakeLists.txt | 68 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 39760bcf5..56376f1d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,11 @@ INCLUDE_DIRECTORIES( SET( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_HOME_DIRECTORY}/lib ) SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_HOME_DIRECTORY}/bin ) +SET( LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib" ) + +SET( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" ) +SET( LIBRARY_VERSION "1.0.0" ) +SET( LIBRARY_SOVERSION "1" ) # Libs add_subdirectory( code/ ) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 2244b713d..5bd5d1fb8 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -1,6 +1,48 @@ - SET( HEADER_PATH ../include/ ) +SET( COMPILER_HEADERS + ${HEADER_PATH}/Compiler/pushpack1.h + ${HEADER_PATH}/Compiler/poppack1.h +) + +SET( PUBLIC_HEADERS + aiAnim.h + aiAssert.h + aiCamera.h + aiColor4D.h + aiColor4D.inl + aiConfig.h + aiDefines.h + aiFileIO.h + aiLight.h + aiMaterial.h + aiMaterial.inl + aiMatrix3x3.h + aiMatrix3x3.inl + aiMatrix4x4.h + aiMatrix4x4.inl + aiMesh.h + aiPostProcess.h + aiQuaternion.h + aiScene.h + aiTexture.h + aiTypes.h + aiVector2D.h + aiVector3D.h + aiVector3D.inl + aiVersion.h + assimp.h + assimp.hpp + BoostWorkaround + Compiler + DefaultLogger.h + IOStream.h + IOSystem.h + Logger.h + LogStream.h + NullLogger.h +) + SOURCE_GROUP( Logging FILES ${HEADER_PATH}/DefaultLogger.h ${HEADER_PATH}/IOStream.h @@ -11,6 +53,7 @@ SOURCE_GROUP( Logging FILES DefaultLogger.cpp FileLogStream.h ) + SOURCE_GROUP( Common FILES aiAssert.cpp fast_atof.h @@ -265,6 +308,12 @@ SOURCE_GROUP( Q3D FILES Q3DLoader.cpp Q3DLoader.h ) +#SOURCE_GROUP( Q3BSP FILES +# Q3BSPFileParser.h +# Q3BSPFileParser.cpp +# Q3BSPFileImporter.h +# Q3BSPFileImporter.cpp +#) SOURCE_GROUP( Raw FILES RawLoader.cpp @@ -501,6 +550,10 @@ ADD_LIBRARY( assimp SHARED ProcessHelper.h Q3DLoader.cpp Q3DLoader.h + #Q3BSPFileParser.h + #Q3BSPFileParser.cpp + #Q3BSPFileImporter.h + #Q3BSPFileImporter.cpp RawLoader.cpp RawLoader.h RemoveComments.cpp @@ -601,4 +654,17 @@ if (WIN32) ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS ) ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS ) endif( MSVC80 ) + if ( MSVC90 ) + ADD_DEFINITIONS( -D_SCL_SECURE_NO_WARNINGS ) + ADD_DEFINITIONS( -D_CRT_SECURE_NO_WARNINGS ) + endif( MSVC90 ) endif (WIN32) + +SET_TARGET_PROPERTIES( assimp PROPERTIES + VERSION ${LIBRARY_VERSION} + SOVERSION ${LIBRARY_SOVERSION} +) + +INSTALL( TARGETS assimp DESTINATION ${LIB_INSTALL_DIR} ) +INSTALL( FILES ${PUBLIC_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp ) +INSTALL( FILES ${COMPILER_HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/assimp/Compiler ) \ No newline at end of file