فهرست منبع

Updated third party dependency file structure since now there's a need for multiple engine libraries to reference the same external library

BearishSun 9 سال پیش
والد
کامیت
bca1b75466

+ 2 - 2
Source/BansheeCore/CMakeLists.txt

@@ -5,7 +5,7 @@ include(CMakeSources.cmake)
 set(BansheeCore_INC 
 	"Include" 
 	"../BansheeUtility/Include" 
-	"../../Dependencies/BansheeCore/Include")
+	"../../Dependencies/nvtt/include")
 
 if(WIN32)
 	set(BansheeCore_INC ${BansheeCore_INC} "Include/Win32")
@@ -21,7 +21,7 @@ target_compile_definitions(BansheeCore PRIVATE -DBS_CORE_EXPORTS)
 
 # Libraries
 ## External lib: NVTT
-add_library_per_config(BansheeCore nvtt)
+add_library_per_config(BansheeCore nvtt Release/nvtt Debug/nvtt)
 
 ## Local libs
 target_link_libraries(BansheeCore PUBLIC BansheeUtility)	

+ 1 - 1
Source/BansheeCore/Source/BsPixelUtil.cpp

@@ -5,7 +5,7 @@
 #include "BsColor.h"
 #include "BsMath.h"
 #include "BsException.h"
-#include "nvtt/nvtt.h"
+#include <nvtt.h>
 
 namespace BansheeEngine 
 {

+ 2 - 2
Source/BansheeFBXImporter/CMakeLists.txt

@@ -6,7 +6,7 @@ set(BansheeFBXImporter_INC
 	"Include" 
 	"../BansheeUtility/Include" 
 	"../BansheeCore/Include"
-	"../../Dependencies/BansheeFBXImporter/Include")
+	"../../Dependencies/FBXSDK/include")
 
 include_directories(${BansheeFBXImporter_INC})	
 	
@@ -18,7 +18,7 @@ target_compile_definitions(BansheeFBXImporter PRIVATE -DBS_FBX_EXPORTS)
 
 # Libraries
 ## External lib: FBX
-add_library_per_config(BansheeFBXImporter libfbxsdk-md)	
+add_library_per_config(BansheeFBXImporter FBXSDK Release/libfbxsdk-md Debug/libfbxsdk-md)	
 
 ## Local libs
 target_link_libraries(BansheeFBXImporter PUBLIC BansheeUtility BansheeCore)

+ 2 - 2
Source/BansheeFontImporter/CMakeLists.txt

@@ -6,7 +6,7 @@ set(BansheeFontImporter_INC
 	"Include" 
 	"../BansheeUtility/Include" 
 	"../BansheeCore/Include"
-	"../../Dependencies/BansheeFontImporter/Include")
+	"../../Dependencies/freetype/include")
 
 include_directories(${BansheeFontImporter_INC})	
 	
@@ -18,7 +18,7 @@ target_compile_definitions(BansheeFontImporter PRIVATE -DBS_FONT_EXPORTS -DUSE_F
 
 # Libraries
 ## External lib: FreeType
-add_library_per_config(BansheeFontImporter freetype)
+add_library_per_config(BansheeFontImporter freetype Release/freetype Debug/freetype)
 
 ## Local libs
 target_link_libraries(BansheeFontImporter PUBLIC BansheeUtility BansheeCore)

+ 2 - 2
Source/BansheeFreeImgImporter/CMakeLists.txt

@@ -6,7 +6,7 @@ set(BansheeFreeImgImporter_INC
 	"Include" 
 	"../BansheeUtility/Include" 
 	"../BansheeCore/Include"
-	"../../Dependencies/BansheeFreeImgImporter/Include")
+	"../../Dependencies/freeimg/include")
 
 include_directories(${BansheeFreeImgImporter_INC})	
 	
@@ -18,7 +18,7 @@ target_compile_definitions(BansheeFreeImgImporter PRIVATE -DBS_FREEIMG_EXPORTS -
 
 # Libraries
 ## External lib: FreeImage
-add_library_per_config(BansheeFreeImgImporter FreeImage)
+add_library_per_config(BansheeFreeImgImporter freeimg Release/FreeImage Debug/FreeImage)
 
 ## Local libs
 target_link_libraries(BansheeFreeImgImporter PUBLIC BansheeUtility BansheeCore)

+ 2 - 2
Source/BansheeMono/CMakeLists.txt

@@ -7,7 +7,7 @@ set(BansheeMono_INC
 	"../BansheeUtility/Include" 
 	"../BansheeCore/Include"
 	"../BansheeEngine/Include"
-	"../../Dependencies/BansheeMono/Include")
+	"../../Dependencies/Mono/include")
 
 include_directories(${BansheeMono_INC})	
 	
@@ -19,7 +19,7 @@ target_compile_definitions(BansheeMono PRIVATE -DBS_MONO_EXPORTS)
 
 # Libraries
 ## External lib: Mono
-add_library_per_config(BansheeMono mono-2.0)
+add_library_per_config(BansheeMono mono Release/mono-2.0 Debug/mono-2.0)
 
 ## Local libs
 target_link_libraries(BansheeMono PUBLIC BansheeEngine BansheeUtility BansheeCore)

+ 2 - 2
Source/BansheeOISInput/CMakeLists.txt

@@ -6,7 +6,7 @@ set(BansheeOISInput_INC
 	"Include"
 	"../BansheeUtility/Include" 
 	"../BansheeCore/Include"
-	"../../Dependencies/BansheeOISInput/Include")
+	"../../Dependencies/OIS/include")
 
 include_directories(${BansheeOISInput_INC})	
 	
@@ -18,7 +18,7 @@ target_compile_definitions(BansheeOISInput PRIVATE -DBS_OIS_EXPORTS -DOIS_DYNAMI
 
 # Libraries
 ## External lib: OIS
-add_library_per_config(BansheeOISInput BansheeOIS)
+add_library_per_config(BansheeOISInput OIS Release/BansheeOIS Debug/BansheeOIS)
 
 ## Local libs
 target_link_libraries(BansheeOISInput PUBLIC BansheeUtility BansheeCore)

+ 9 - 7
Source/BansheeOpenAudio/CMakeLists.txt

@@ -6,8 +6,10 @@ set(BansheeOpenAudio_INC
 	"Include" 
 	"../BansheeUtility/Include" 
 	"../BansheeCore/Include"
-	"../../Dependencies/BansheeOpenAudio/Include"
-	"../../Dependencies/BansheeOpenAudio/Include/vorbis")
+	"../../Dependencies/libogg/include"
+	"../../Dependencies/libvorbis/include"
+	"../../Dependencies/libFLAC/include"
+	"../../Dependencies/OpenAL/include")
 
 include_directories(${BansheeOpenAudio_INC})	
 	
@@ -19,11 +21,11 @@ target_compile_definitions(BansheeOpenAudio PRIVATE -DBS_OA_EXPORTS)
 
 # Libraries
 ## External libs: FLAC, Vorbis, Ogg, OpenAL
-add_library_per_config(BansheeOpenAudio libFLAC)
-add_library_per_config(BansheeOpenAudio libvorbis)
-add_library_per_config(BansheeOpenAudio libvorbisfile)
-add_library_per_config(BansheeOpenAudio libogg)
-add_library_per_config(BansheeOpenAudio OpenAL32)
+add_library_per_config(BansheeOpenAudio libFLAC libFLAC libFLAC)
+add_library_per_config_multi(BansheeOpenAudio libvorbis libvorbis libvorbis libvorbis)
+add_library_per_config_multi(BansheeOpenAudio libvorbisfile libvorbis libvorbisfile libvorbisfile)
+add_library_per_config(BansheeOpenAudio libogg Release/libogg Debug/libogg)
+add_library_per_config(BansheeOpenAudio OpenAL OpenAL32 OpenAL32)
 
 ## Local libs
 target_link_libraries(BansheeOpenAudio PUBLIC BansheeUtility BansheeCore)

+ 14 - 6
Source/BansheePhysX/CMakeLists.txt

@@ -4,7 +4,7 @@ include(CMakeSources.cmake)
 # Includes
 set(BansheePhysX_INC 
 	"Include"
-	"../../Dependencies/BansheePhysX/Include"
+	"../../Dependencies/PhysX/include"
 	"../BansheeUtility/Include" 
 	"../BansheeCore/Include")
 
@@ -25,11 +25,19 @@ else()
 endif()
 
 ## External lib: PhysX
-add_library_per_config_suffix(BansheePhysX PhysX3 ${BS_PHYSX_SUFFIX} CHECKED${BS_PHYSX_SUFFIX})
-add_library_per_config_suffix(BansheePhysX PhysX3Common ${BS_PHYSX_SUFFIX} CHECKED${BS_PHYSX_SUFFIX})
-add_library_per_config_suffix(BansheePhysX PhysX3Cooking ${BS_PHYSX_SUFFIX} CHECKED${BS_PHYSX_SUFFIX})	
-add_library_per_config_suffix(BansheePhysX PhysX3CharacterKinematic ${BS_PHYSX_SUFFIX} CHECKED${BS_PHYSX_SUFFIX})
-add_library_per_config_suffix(BansheePhysX PhysX3Extensions "" CHECKED)
+if(BS_64BIT)
+	add_library_per_config_multi(BansheePhysX PhysX PhysX Release/PhysX3_x64 Debug/PhysX3CHECKED_x64)
+	add_library_per_config_multi(BansheePhysX PhysX3Common PhysX Release/PhysX3Common_x64 Debug/PhysX3CommonCHECKED_x64)
+	add_library_per_config_multi(BansheePhysX PhysX3Cooking PhysX Release/PhysX3Cooking_x64 Debug/PhysX3CookingCHECKED_x64)	
+	add_library_per_config_multi(BansheePhysX PhysX3CharacterKinematic PhysX Release/PhysX3CharacterKinematic_x64 Debug/PhysX3CharacterKinematicCHECKED_x64)
+	add_library_per_config_multi(BansheePhysX PhysX3Extensions PhysX Release/PhysX3Extensions Debug/PhysX3ExtensionsCHECKED)
+else()
+	add_library_per_config_multi(BansheePhysX PhysX3 PhysX Release/PhysX3_x86 Debug/PhysX3CHECKED_x86)
+	add_library_per_config_multi(BansheePhysX PhysX3Common PhysX Release/PhysX3Common_x86 Debug/PhysX3CommonCHECKED_x86)
+	add_library_per_config_multi(BansheePhysX PhysX3Cooking PhysX Release/PhysX3Cooking_x86 Debug/PhysX3CookingCHECKED_x86)	
+	add_library_per_config_multi(BansheePhysX PhysX3CharacterKinematic PhysX Release/PhysX3CharacterKinematic_x86 Debug/PhysX3CharacterKinematicCHECKED_x86)
+	add_library_per_config_multi(BansheePhysX PhysX3Extensions PhysX Release/PhysX3Extensions Debug/PhysX3ExtensionsCHECKED)
+endif()
 
 ## Local libs
 target_link_libraries(BansheePhysX PUBLIC BansheeUtility BansheeCore)

+ 2 - 2
Source/BansheeSL/CMakeLists.txt

@@ -19,8 +19,8 @@ target_compile_definitions(BansheeSL PRIVATE -DBS_SL_EXPORTS)
 # Pre-build step
 if(WIN32)
 add_custom_command(TARGET BansheeSL PRE_BUILD 
-	COMMAND ../../../Dependencies/BansheeSL/tools/flex/flex.exe --wincompat ../../../Source/BansheeSL/BsLexerFX.l
-	COMMAND ../../../Dependencies/BansheeSL/tools/bison/bison.exe ../../../Source/BansheeSL/BsParserFX.y
+	COMMAND ../../../Dependencies/tools/flex/flex.exe --wincompat ../../../Source/BansheeSL/BsLexerFX.l
+	COMMAND ../../../Dependencies/tools/bison/bison.exe ../../../Source/BansheeSL/BsParserFX.y
 	COMMAND xcopy /Y /I BsLexerFX.h \"../../../Source/BansheeSL/Include\"
 	COMMAND xcopy /Y /I BsLexerFX.c \"../../../Source/BansheeSL/Source\"
 	COMMAND xcopy /Y /I BsParserFX.h \"../../../Source/BansheeSL/Include\"

+ 8 - 8
Source/CMakeLists.txt

@@ -139,20 +139,20 @@ else()
 	set(BS_LIBRARY_EXTENSION ".a")
 endif()
 
-function(add_library_per_config target_name lib_name)
+function(add_library_per_config target_name lib_name release_name debug_name)
 	add_library(${lib_name} STATIC IMPORTED)
-	set_target_properties(${lib_name} PROPERTIES IMPORTED_LOCATION_DEBUG ${PROJECT_SOURCE_DIR}/../Dependencies/${target_name}/lib/${BS_OUTPUT_DIR_PREFIX}/Debug/${lib_name}${BS_LIBRARY_EXTENSION})
-	set_target_properties(${lib_name} PROPERTIES IMPORTED_LOCATION_OPTIMIZEDDEBUG ${PROJECT_SOURCE_DIR}/../Dependencies/${target_name}/lib/${BS_OUTPUT_DIR_PREFIX}/OptimizedDebug/${lib_name}${BS_LIBRARY_EXTENSION})
-	set_target_properties(${lib_name} PROPERTIES IMPORTED_LOCATION_RELEASE ${PROJECT_SOURCE_DIR}/../Dependencies/${target_name}/lib/${BS_OUTPUT_DIR_PREFIX}/Release/${lib_name}${BS_LIBRARY_EXTENSION})	
+	set_target_properties(${lib_name} PROPERTIES IMPORTED_LOCATION_DEBUG ${PROJECT_SOURCE_DIR}/../Dependencies/${lib_name}/lib/${BS_OUTPUT_DIR_PREFIX}/${debug_name}${BS_LIBRARY_EXTENSION})
+	set_target_properties(${lib_name} PROPERTIES IMPORTED_LOCATION_OPTIMIZEDDEBUG ${PROJECT_SOURCE_DIR}/../Dependencies/${lib_name}/lib/${BS_OUTPUT_DIR_PREFIX}/${release_name}${BS_LIBRARY_EXTENSION})
+	set_target_properties(${lib_name} PROPERTIES IMPORTED_LOCATION_RELEASE ${PROJECT_SOURCE_DIR}/../Dependencies/${lib_name}/lib/${BS_OUTPUT_DIR_PREFIX}/${release_name}${BS_LIBRARY_EXTENSION})	
 	
 	target_link_libraries(${target_name} PRIVATE ${lib_name})	
 endfunction()
 
-function(add_library_per_config_suffix target_name lib_name rls_suffix debug_suffix)
+function(add_library_per_config_multi target_name lib_name file_name release_name debug_name)
 	add_library(${lib_name} STATIC IMPORTED)
-	set_target_properties(${lib_name} PROPERTIES IMPORTED_LOCATION_DEBUG ${PROJECT_SOURCE_DIR}/../Dependencies/${target_name}/lib/${BS_OUTPUT_DIR_PREFIX}/Debug/${lib_name}${debug_suffix}${BS_LIBRARY_EXTENSION})
-	set_target_properties(${lib_name} PROPERTIES IMPORTED_LOCATION_OPTIMIZEDDEBUG ${PROJECT_SOURCE_DIR}/../Dependencies/${target_name}/lib/${BS_OUTPUT_DIR_PREFIX}/OptimizedDebug/${lib_name}${rls_suffix}${BS_LIBRARY_EXTENSION})
-	set_target_properties(${lib_name} PROPERTIES IMPORTED_LOCATION_RELEASE ${PROJECT_SOURCE_DIR}/../Dependencies/${target_name}/lib/${BS_OUTPUT_DIR_PREFIX}/Release/${lib_name}${rls_suffix}${BS_LIBRARY_EXTENSION})	
+	set_target_properties(${lib_name} PROPERTIES IMPORTED_LOCATION_DEBUG ${PROJECT_SOURCE_DIR}/../Dependencies/${file_name}/lib/${BS_OUTPUT_DIR_PREFIX}/${debug_name}${BS_LIBRARY_EXTENSION})
+	set_target_properties(${lib_name} PROPERTIES IMPORTED_LOCATION_OPTIMIZEDDEBUG ${PROJECT_SOURCE_DIR}/../Dependencies/${file_name}/lib/${BS_OUTPUT_DIR_PREFIX}/${release_name}${BS_LIBRARY_EXTENSION})
+	set_target_properties(${lib_name} PROPERTIES IMPORTED_LOCATION_RELEASE ${PROJECT_SOURCE_DIR}/../Dependencies/${file_name}/lib/${BS_OUTPUT_DIR_PREFIX}/${release_name}${BS_LIBRARY_EXTENSION})	
 	
 	target_link_libraries(${target_name} PRIVATE ${lib_name})	
 endfunction()