Changeset View
Changeset View
Standalone View
Standalone View
extern/draco/CMakeLists.txt
| Show All 18 Lines | |||||
| # ***** END GPL LICENSE BLOCK ***** | # ***** END GPL LICENSE BLOCK ***** | ||||
| set(CMAKE_CXX_STANDARD 14) | set(CMAKE_CXX_STANDARD 14) | ||||
| # Build Draco library. | # Build Draco library. | ||||
| add_subdirectory(dracoenc) | add_subdirectory(dracoenc) | ||||
| # Build blender-draco-exporter module. | # Build blender-draco-exporter module. | ||||
| add_library(extern_draco SHARED src/draco-compressor.cpp src/draco-compressor.h) | set(SRC | ||||
| target_include_directories(extern_draco PUBLIC dracoenc/src) | src/draco-compressor.cpp | ||||
| target_link_libraries(extern_draco PUBLIC dracoenc) | 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}") | |||||
LazyDodo: Duplicating code all over the place is not the way to go, In `build_files/cmake/macros.cmake`… | |||||
Duplicating code all over the place is not the way to go, In build_files/cmake/macros.cmake add a blender_project_group macro that has this bit of code in it and call the macro instead.
Once you have the macro don't forget to de-duplicate the code in blender_add_lib__impl as well.