git.s-ol.nu ~forks/DiligentTools / ac5c96e
Added install instructions Egor Yusov 2 years ago
8 changed file(s) with 94 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
4343 set_target_properties(Diligent-AssetLoader PROPERTIES
4444 FOLDER DiligentTools
4545 )
46
47 if(INSTALL_DILIGENT_TOOLS)
48 install_tools_lib(Diligent-AssetLoader)
49 endif()
2525 #include <vector>
2626 #include <memory>
2727
28 #include "RefCntAutoPtr.h"
29 #include "RenderDevice.h"
30 #include "DeviceContext.h"
31 #include "AdvancedMath.h"
28 #include "../../../DiligentCore/Graphics/GraphicsEngine/interface/RenderDevice.h"
29 #include "../../../DiligentCore/Graphics/GraphicsEngine/interface/DeviceContext.h"
30 #include "../../../DiligentCore/Common/interface/RefCntAutoPtr.h"
31 #include "../../../DiligentCore/Common/interface/AdvancedMath.h"
3232
3333 namespace tinygltf
3434 {
00 cmake_minimum_required (VERSION 3.6)
11
22 option(DILIGENT_BUILD_RENDER_SCRIPT "Build render script" ON)
3
4 file(RELATIVE_PATH DILIGENT_TOOLS_DIR "${CMAKE_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
5
6 if(NOT INSTALL_DILIGENT_TOOLS)
7 set(INSTALL_DILIGENT_TOOLS ${INSTALL_DILIGENT_CORE})
8 endif()
9
10 function(install_tools_lib _TARGET)
11 get_target_relative_dir(${_TARGET} TARGET_RELATIVE_PATH)
12
13 get_target_property(TARGET_TYPE ${_TARGET} TYPE)
14 if(TARGET_TYPE STREQUAL STATIC_LIBRARY)
15 list(APPEND DILIGENT_TOOLS_INSTALL_LIBS_LIST ${_TARGET})
16 set(DILIGENT_TOOLS_INSTALL_LIBS_LIST ${DILIGENT_TOOLS_INSTALL_LIBS_LIST} CACHE INTERNAL "Diligent tools libraries installation list")
17 elseif(TARGET_TYPE STREQUAL SHARED_LIBRARY)
18 install(TARGETS ${_TARGET}
19 ARCHIVE DESTINATION "lib/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
20 LIBRARY DESTINATION "bin/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
21 RUNTIME DESTINATION "bin/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
22 )
23 if (DILIGENT_INSTALL_PDB)
24 install(FILES $<TARGET_PDB_FILE:${_TARGET}> DESTINATION "bin/${DILIGENT_TOOLS_DIR}/$<CONFIG>" OPTIONAL)
25 endif()
26 endif()
27
28 if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/interface")
29 install(DIRECTORY interface
30 DESTINATION "headers/${TARGET_RELATIVE_PATH}/"
31 )
32 endif()
33 endfunction()
334
435 add_subdirectory(ThirdParty)
536 add_subdirectory(TextureLoader)
1445 if(PLATFORM_WIN32 AND GL_SUPPORTED)
1546 add_subdirectory(HLSL2GLSLConverter)
1647 endif()
48
49 # Installation instructions
50 if(INSTALL_DILIGENT_TOOLS)
51
52 install_combined_static_lib(
53 "${CMAKE_STATIC_LIBRARY_PREFIX}DiligentTools${CMAKE_STATIC_LIBRARY_SUFFIX}"
54 "${DILIGENT_TOOLS_INSTALL_LIBS_LIST}"
55 DiligentTools-static # Custom target name
56 DiligentTools # Folder
57 "lib/${DILIGENT_TOOLS_DIR}/$<CONFIG>" # Install destination
58 )
59
60 install(FILES License.txt DESTINATION "Licenses/${DILIGENT_TOOLS_DIR}" RENAME DiligentEngine-License.txt)
61 endif()
3434 set_target_properties(HLSL2GLSLConverter PROPERTIES
3535 FOLDER DiligentTools
3636 )
37
38 install(TARGETS HLSL2GLSLConverter
39 ARCHIVE DESTINATION "lib/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
40 LIBRARY DESTINATION "lib/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
41 RUNTIME DESTINATION "bin/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
42 )
100100 set_target_properties(Diligent-Imgui PROPERTIES
101101 FOLDER DiligentTools
102102 )
103
104 if(INSTALL_DILIGENT_TOOLS)
105 install_tools_lib(Diligent-Imgui)
106 endif()
2525 #include <algorithm>
2626 #include <limits>
2727
28 #include "imgui.h"
29 #include "imgui_internal.h"
28 #include "../../ThirdParty/imgui/imgui.h"
29 #include "../../ThirdParty/imgui/imgui_internal.h"
3030
3131 namespace Diligent
3232 {
5050
5151 set_target_properties(Diligent-TextureLoader PROPERTIES
5252 FOLDER DiligentTools
53 )
53 )
54
55 if(INSTALL_DILIGENT_TOOLS)
56 install_tools_lib(Diligent-TextureLoader)
57 endif()
1616 install(FILES zlib-1.2.8/README DESTINATION ${LICENSE_INSTALL_PATH} RENAME zlib-readme.txt)
1717 install(FILES imgui/LICENSE.txt DESTINATION ${LICENSE_INSTALL_PATH} RENAME imgui-license.txt)
1818 install(FILES imGuIZMO.quat/license.txt DESTINATION ${LICENSE_INSTALL_PATH} RENAME imGuIZMO.quat-license.txt)
19
20 if(INSTALL_DILIGENT_TOOLS)
21 set(THIRD_PARTY_TARGETS LibJpeg LibPng LibTiff Lua ZLib)
22 install(TARGETS ${THIRD_PARTY_TARGETS}
23 ARCHIVE DESTINATION "lib/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
24 LIBRARY DESTINATION "lib/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
25 RUNTIME DESTINATION "bin/${DILIGENT_TOOLS_DIR}/$<CONFIG>"
26 )
27
28 list(APPEND DILIGENT_TOOLS_INSTALL_LIBS_LIST ${THIRD_PARTY_TARGETS})
29 set(DILIGENT_TOOLS_INSTALL_LIBS_LIST ${DILIGENT_TOOLS_INSTALL_LIBS_LIST} CACHE INTERNAL "Diligent tools libraries installation list")
30
31 install(
32 FILES
33 imgui/imconfig.h
34 imgui/imgui.h
35 imgui/imgui_internal.h
36 imgui/imstb_rectpack.h
37 imgui/imstb_textedit.h
38 imgui/imstb_truetype.h
39 DESTINATION
40 "headers/${THIRD_PARTY_DIR}/imgui"
41 )
42 endif()