Build: show draco library under extern folder in Visual Studio
And other code tweaks to make this library more consistent with others. Differential Revision: https://developer.blender.org/D6864
This commit is contained in:

committed by
Brecht Van Lommel

parent
24ef1cf07e
commit
6a6ccb26ec
@@ -170,6 +170,7 @@ function(blender_include_dirs_sys
|
||||
endfunction()
|
||||
|
||||
function(blender_source_group
|
||||
name
|
||||
sources
|
||||
)
|
||||
|
||||
@@ -205,6 +206,13 @@ function(blender_source_group
|
||||
source_group("${GROUP_ID}" FILES ${_SRC})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# if enabled, set the FOLDER property for visual studio projects
|
||||
if(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
|
||||
get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir})
|
||||
set_target_properties(${name} PROPERTIES FOLDER ${FolderDir})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
@@ -308,14 +316,7 @@ function(blender_add_lib__impl
|
||||
|
||||
# works fine without having the includes
|
||||
# listed is helpful for IDE's (QtCreator/MSVC)
|
||||
blender_source_group("${sources}")
|
||||
|
||||
# if enabled, set the FOLDER property for visual studio projects
|
||||
if(WINDOWS_USE_VISUAL_STUDIO_PROJECT_FOLDERS)
|
||||
get_filename_component(FolderDir ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
|
||||
string(REPLACE ${CMAKE_SOURCE_DIR} "" FolderDir ${FolderDir})
|
||||
set_target_properties(${name} PROPERTIES FOLDER ${FolderDir})
|
||||
endif()
|
||||
blender_source_group("${name}" "${sources}")
|
||||
|
||||
list_assert_duplicates("${sources}")
|
||||
list_assert_duplicates("${includes}")
|
||||
|
21
extern/draco/CMakeLists.txt
vendored
21
extern/draco/CMakeLists.txt
vendored
@@ -24,6 +24,21 @@ set(CMAKE_CXX_STANDARD 14)
|
||||
add_subdirectory(dracoenc)
|
||||
|
||||
# Build blender-draco-exporter module.
|
||||
add_library(extern_draco SHARED src/draco-compressor.cpp src/draco-compressor.h)
|
||||
target_include_directories(extern_draco PUBLIC dracoenc/src)
|
||||
target_link_libraries(extern_draco PUBLIC dracoenc)
|
||||
set(SRC
|
||||
src/draco-compressor.cpp
|
||||
src/draco-compressor.h
|
||||
)
|
||||
|
||||
set(INC
|
||||
dracoenc/src
|
||||
)
|
||||
|
||||
set(LIB
|
||||
dracoenc
|
||||
)
|
||||
|
||||
add_library(extern_draco SHARED "${SRC}")
|
||||
target_include_directories(extern_draco PUBLIC "${INC}")
|
||||
target_link_libraries(extern_draco PUBLIC "${LIB}")
|
||||
|
||||
blender_source_group(extern_draco "${SRC}")
|
||||
|
Reference in New Issue
Block a user