Improved Findassimp.cmake to support VS2013. Added deployment of VS2013 libs and dll files.
parent
1fd66df37d
commit
270355f326
|
@ -66,3 +66,9 @@ lib64/assimp-vc140-mt.exp
|
||||||
lib64/assimp-vc140-mtd.exp
|
lib64/assimp-vc140-mtd.exp
|
||||||
lib64/assimp-vc140-mtd.ilk
|
lib64/assimp-vc140-mtd.ilk
|
||||||
lib64/assimp-vc140-mtd.pdb
|
lib64/assimp-vc140-mtd.pdb
|
||||||
|
bin64/assimp-vc120-mt.dll
|
||||||
|
bin64/assimp-vc120-mtd.dll
|
||||||
|
lib64/assimp-vc120-mtd.pdb
|
||||||
|
lib64/assimp-vc120-mtd.ilk
|
||||||
|
lib64/assimp-vc120-mtd.exp
|
||||||
|
lib64/assimp-vc120-mt.exp
|
||||||
|
|
|
@ -342,23 +342,29 @@ if(CMAKE_CPACK_COMMAND AND UNIX AND ASSIMP_OPT_BUILD_PACKAGES)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
if(MSVC14)
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
set(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/")
|
||||||
set(BIN_DIR "${PROJECT_SOURCE_DIR}/bin64/")
|
set(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/")
|
||||||
set(LIB_DIR "${PROJECT_SOURCE_DIR}/lib64/")
|
elseif()
|
||||||
elseif()
|
set(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/")
|
||||||
set(BIN_DIR "${PROJECT_SOURCE_DIR}/bin32/")
|
set(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/")
|
||||||
set(LIB_DIR "${PROJECT_SOURCE_DIR}/lib32/")
|
endif()
|
||||||
endif()
|
|
||||||
|
if(MSVC12)
|
||||||
|
set(ASSIMP_MSVC_VERSION "vc120")
|
||||||
|
elseif(MSVC14)
|
||||||
|
set(ASSIMP_MSVC_VERSION "vc140")
|
||||||
|
endif(MSVC12)
|
||||||
|
|
||||||
|
if(MSVC12 OR MSVC14)
|
||||||
add_custom_target(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM)
|
add_custom_target(UpdateAssimpLibsDebugSymbolsAndDLLs COMMENT "Copying Assimp Libraries ..." VERBATIM)
|
||||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-vc140-mt.dll ${BIN_DIR}assimp-vc140-mt.dll VERBATIM)
|
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.dll VERBATIM)
|
||||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-vc140-mt.exp ${LIB_DIR}assimp-vc140-mt.exp VERBATIM)
|
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.exp VERBATIM)
|
||||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-vc140-mt.lib ${LIB_DIR}assimp-vc140-mt.lib VERBATIM)
|
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mt.lib VERBATIM)
|
||||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-vc140-mtd.dll ${BIN_DIR}assimp-vc140-mtd.dll VERBATIM)
|
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${BIN_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.dll VERBATIM)
|
||||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-vc140-mtd.exp ${LIB_DIR}assimp-vc140-mtd.exp VERBATIM)
|
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.exp ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.exp VERBATIM)
|
||||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-vc140-mtd.ilk ${LIB_DIR}assimp-vc140-mtd.ilk VERBATIM)
|
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.ilk VERBATIM)
|
||||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-vc140-mtd.lib ${LIB_DIR}assimp-vc140-mtd.lib VERBATIM)
|
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.lib ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.lib VERBATIM)
|
||||||
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-vc140-mtd.pdb ${LIB_DIR}assimp-vc140-mtd.pdb VERBATIM)
|
add_custom_command(TARGET UpdateAssimpLibsDebugSymbolsAndDLLs COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/code/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb ${LIB_DIR}assimp-${ASSIMP_MSVC_VERSION}-mtd.pdb VERBATIM)
|
||||||
endif(MSVC14)
|
endif(MSVC12 OR MSVC14)
|
||||||
endif (WIN32)
|
endif (WIN32)
|
|
@ -15,17 +15,23 @@ if(WIN32)
|
||||||
${ASSIMP_ROOT_DIR}/include
|
${ASSIMP_ROOT_DIR}/include
|
||||||
)
|
)
|
||||||
|
|
||||||
if(MSVC14)
|
if(MSVC12)
|
||||||
|
set(ASSIMP_MSVC_VERSION "vc120")
|
||||||
|
elseif(MSVC14)
|
||||||
|
set(ASSIMP_MSVC_VERSION "vc140")
|
||||||
|
endif(MSVC12)
|
||||||
|
|
||||||
|
if(MSVC12 OR MSVC14)
|
||||||
|
|
||||||
find_path(ASSIMP_LIBRARY_DIR
|
find_path(ASSIMP_LIBRARY_DIR
|
||||||
NAMES
|
NAMES
|
||||||
assimp-vc140-mt.lib
|
assimp-${ASSIMP_MSVC_VERSION}-mt.lib
|
||||||
HINTS
|
HINTS
|
||||||
${ASSIMP_ROOT_DIR}/lib${ASSIMP_ARCHITECTURE}
|
${ASSIMP_ROOT_DIR}/lib${ASSIMP_ARCHITECTURE}
|
||||||
)
|
)
|
||||||
|
|
||||||
find_library(ASSIMP_LIBRARY_RELEASE assimp-vc140-mt.lib PATHS ${ASSIMP_LIBRARY_DIR})
|
find_library(ASSIMP_LIBRARY_RELEASE assimp-${ASSIMP_MSVC_VERSION}-mt.lib PATHS ${ASSIMP_LIBRARY_DIR})
|
||||||
find_library(ASSIMP_LIBRARY_DEBUG assimp-vc140-mtd.lib PATHS ${ASSIMP_LIBRARY_DIR})
|
find_library(ASSIMP_LIBRARY_DEBUG assimp-${ASSIMP_MSVC_VERSION}-mtd.lib PATHS ${ASSIMP_LIBRARY_DIR})
|
||||||
|
|
||||||
set(ASSIMP_LIBRARY
|
set(ASSIMP_LIBRARY
|
||||||
optimized ${ASSIMP_LIBRARY_RELEASE}
|
optimized ${ASSIMP_LIBRARY_RELEASE}
|
||||||
|
@ -36,13 +42,13 @@ if(WIN32)
|
||||||
|
|
||||||
FUNCTION(ASSIMP_COPY_BINARIES TargetDirectory)
|
FUNCTION(ASSIMP_COPY_BINARIES TargetDirectory)
|
||||||
ADD_CUSTOM_TARGET(AssimpCopyBinaries
|
ADD_CUSTOM_TARGET(AssimpCopyBinaries
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${ASSIMP_ROOT_DIR}/bin${ASSIMP_ARCHITECTURE}/assimp-vc140-mtd.dll ${TargetDirectory}/Debug/assimp-vc140-mtd.dll
|
COMMAND ${CMAKE_COMMAND} -E copy ${ASSIMP_ROOT_DIR}/bin${ASSIMP_ARCHITECTURE}/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll ${TargetDirectory}/Debug/assimp-${ASSIMP_MSVC_VERSION}-mtd.dll
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${ASSIMP_ROOT_DIR}/bin${ASSIMP_ARCHITECTURE}/assimp-vc140-mt.dll ${TargetDirectory}/Release/assimp-vc140-mt.dll
|
COMMAND ${CMAKE_COMMAND} -E copy ${ASSIMP_ROOT_DIR}/bin${ASSIMP_ARCHITECTURE}/assimp-${ASSIMP_MSVC_VERSION}-mt.dll ${TargetDirectory}/Release/assimp-${ASSIMP_MSVC_VERSION}-mt.dll
|
||||||
COMMENT "Copying Assimp binaries to '${TargetDirectory}'"
|
COMMENT "Copying Assimp binaries to '${TargetDirectory}'"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
ENDFUNCTION(ASSIMP_COPY_BINARIES)
|
ENDFUNCTION(ASSIMP_COPY_BINARIES)
|
||||||
|
|
||||||
endif(MSVC14)
|
endif()
|
||||||
|
|
||||||
else(WIN32)
|
else(WIN32)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue