[Bf-blender-cvs] [6071e182d82] greasepencil-object: GPencil: Create basic structure of new project for IO

Antonio Vazquez noreply at git.blender.org
Sat Jul 25 16:33:27 CEST 2020


Commit: 6071e182d82d26570178442072d4e4d35b60c13b
Author: Antonio Vazquez
Date:   Thu Jul 23 16:38:07 2020 +0200
Branches: greasepencil-object
https://developer.blender.org/rB6071e182d82d26570178442072d4e4d35b60c13b

GPencil: Create basic structure of new project for IO

This project will be used to export data.

===================================================================

M	build_files/build_environment/cmake/pugixml.cmake
M	build_files/cmake/platform/platform_win32.cmake
M	source/blender/io/CMakeLists.txt
A	source/blender/io/gpencil_io/CMakeLists.txt
A	source/blender/io/gpencil_io/gpencil_io_exporter.h
A	source/blender/io/gpencil_io/intern/gpencil_io_capi.cc

===================================================================

diff --git a/build_files/build_environment/cmake/pugixml.cmake b/build_files/build_environment/cmake/pugixml.cmake
index 8804ae74836..932ccb65a23 100644
--- a/build_files/build_environment/cmake/pugixml.cmake
+++ b/build_files/build_environment/cmake/pugixml.cmake
@@ -30,13 +30,13 @@ ExternalProject_Add(external_pugixml
 if(WIN32)
   if(BUILD_MODE STREQUAL Release)
     ExternalProject_Add_Step(external_pugixml after_install
-      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
+      COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pugixml ${HARVEST_TARGET}/pugixml
       DEPENDEES install
     )
   endif()
   if(BUILD_MODE STREQUAL Debug)
     ExternalProject_Add_Step(external_pugixml after_install
-      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
+      COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/pugixml/lib/pugixml_d.lib
       DEPENDEES install
     )
   endif() 
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index 01d48364435..88d096f7480 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -246,6 +246,9 @@ foreach(child ${children})
   endif()
 endforeach()
 
+set(PUGIXML_LIBRARIES optimized ${LIBDIR}/pugixml/lib/pugixml.lib debug ${LIBDIR}/pugixml/lib/pugixml_d.lib)
+set(PUGIXML_INCLUDE_DIRS ${LIBDIR}/pugixml/include)
+
 set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include)
 set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/libz_st.lib)
 set(ZLIB_INCLUDE_DIR ${LIBDIR}/zlib/include)
@@ -643,11 +646,10 @@ if(WITH_CYCLES_OSL)
     optimized ${OSL_LIB_COMP}
     optimized ${OSL_LIB_EXEC}
     optimized ${OSL_LIB_QUERY}
-    optimized ${CYCLES_OSL}/lib/pugixml.lib
     debug ${OSL_LIB_EXEC_DEBUG}
     debug ${OSL_LIB_COMP_DEBUG}
     debug ${OSL_LIB_QUERY_DEBUG}
-    debug ${CYCLES_OSL}/lib/pugixml_d.lib
+    ${PUGIXML_LIBRARIES}
   )
   find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
   find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
diff --git a/source/blender/io/CMakeLists.txt b/source/blender/io/CMakeLists.txt
index 360cacc4360..a405f5c7974 100644
--- a/source/blender/io/CMakeLists.txt
+++ b/source/blender/io/CMakeLists.txt
@@ -35,3 +35,6 @@ endif()
 if(WITH_USD)
   add_subdirectory(usd)
 endif()
+
+add_subdirectory(gpencil_io)
+
diff --git a/source/blender/io/CMakeLists.txt b/source/blender/io/gpencil_io/CMakeLists.txt
similarity index 56%
copy from source/blender/io/CMakeLists.txt
copy to source/blender/io/gpencil_io/CMakeLists.txt
index 360cacc4360..8d954e4b1a2 100644
--- a/source/blender/io/CMakeLists.txt
+++ b/source/blender/io/gpencil_io/CMakeLists.txt
@@ -14,24 +14,47 @@
 # along with this program; if not, write to the Free Software Foundation,
 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 #
-# The Original Code is Copyright (C) 2020, Blender Foundation
+# The Original Code is Copyright (C) 2006, Blender Foundation
 # All rights reserved.
 # ***** END GPL LICENSE BLOCK *****
 
-add_subdirectory(common)
+set(INC
+  .
+  ../common
+  ../../blenkernel
+  ../../blenlib
+  ../../blenloader
+  ../../bmesh
+  ../../depsgraph
+  ../../editors/include
+  ../../makesdna
+  ../../makesrna
+  ../../windowmanager
+  ../../../../intern/clog
+  ../../../../intern/guardedalloc
+  ../../../../intern/utfconv
+)
 
-if(WITH_ALEMBIC)
-  add_subdirectory(alembic)
-endif()
+set(INC_SYS
+  ${PUGIXML_INCLUDE_DIRS}
+)
 
-if(WITH_CODEC_AVI)
-  add_subdirectory(avi)
-endif()
+set(SRC
+ intern/gpencil_io_capi.cc
 
-if(WITH_OPENCOLLADA)
-  add_subdirectory(collada)
-endif()
+ gpencil_io_exporter.h
+)
 
-if(WITH_USD)
-  add_subdirectory(usd)
-endif()
+set(LIB
+  bf_blenkernel
+  bf_blenlib
+  bf_io_common
+
+  #${PUGIXML_LIBRARIES}
+)
+
+list(APPEND LIB
+  ${BOOST_LIBRARIES}
+)
+
+blender_add_lib(bf_gpencil_io "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/io/gpencil_io/gpencil_io_exporter.h b/source/blender/io/gpencil_io/gpencil_io_exporter.h
new file mode 100644
index 00000000000..7cc17d28182
--- /dev/null
+++ b/source/blender/io/gpencil_io/gpencil_io_exporter.h
@@ -0,0 +1,29 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+#pragma once
+
+/** \file
+ * \ingroup bgpencil_io
+ */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/source/blender/io/gpencil_io/intern/gpencil_io_capi.cc b/source/blender/io/gpencil_io/intern/gpencil_io_capi.cc
new file mode 100644
index 00000000000..c41c1dc9b7e
--- /dev/null
+++ b/source/blender/io/gpencil_io/intern/gpencil_io_capi.cc
@@ -0,0 +1,21 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+/** \file
+ * \ingroup bgpencil_io
+ */
+
+#include "../gpencil_io_exporter.h"



More information about the Bf-blender-cvs mailing list