Browse Source

move tga to copyleft

Former-commit-id: a80c1f30095a17892a2fc0af17b8753bdf474ff1
Alec Jacobson 7 years ago
parent
commit
efc60f477f

+ 0 - 6
LICENSE → LICENSE.md

@@ -38,9 +38,3 @@ The Libigl code that interfaces with "copyleft" libraries is in
 `include/igl/copyleft`.  Only include these headers if you are accept the
 licensing terms of the corresponding external library.  For example, using
 `include/igl/copyleft/tetgen` requires that you accept the terms of the AGPLv3.
-
-One additional exception is include/igl/opengl2/tga.hpp (and tga.cpp), which is
-subject to the terms of the GNU GPLv2.  No other files include these files, so
-it is safe to use all other files in include/igl/opengl2, even if you do not
-accept the terms of the GPLv2.
-// TODO: consider moving these two files to include/igl/copyleft/opengl2

+ 1 - 1
include/igl/opengl2/render_to_tga.cpp → include/igl/copyleft/opengl2/render_to_tga.cpp

@@ -8,7 +8,7 @@
 #include "render_to_tga.h"
 #include "tga.h"
 
-#include "gl.h"
+#include "../../opengl2/gl.h"
 
 #include <cstdlib>
 

+ 1 - 1
include/igl/opengl2/render_to_tga.h → include/igl/copyleft/opengl2/render_to_tga.h

@@ -7,7 +7,7 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_OPENGL_RENDER_TO_TGA_H
 #define IGL_OPENGL_RENDER_TO_TGA_H
-#include "../igl_inline.h"
+#include "../../igl_inline.h"
 #include <string>
 
 namespace igl

+ 0 - 0
include/igl/opengl2/texture_from_tga.cpp → include/igl/copyleft/opengl2/texture_from_tga.cpp


+ 2 - 2
include/igl/opengl2/texture_from_tga.h → include/igl/copyleft/opengl2/texture_from_tga.h

@@ -7,8 +7,8 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_OPENGL_TEXTURE_FROM_TGA_H
 #define IGL_OPENGL_TEXTURE_FROM_TGA_H
-#include "../igl_inline.h"
-#include "gl.h"
+#include "../../igl_inline.h"
+#include "../../opengl2/gl.h"
 #include <string>
 
 namespace igl

+ 1 - 1
include/igl/opengl2/tga.cpp → include/igl/copyleft/opengl2/tga.cpp

@@ -41,7 +41,7 @@
  */
 
 #include "tga.h"
-#include "glext.h"
+#include "../../opengl2/glext.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

+ 2 - 2
include/igl/opengl2/tga.h → include/igl/copyleft/opengl2/tga.h

@@ -7,9 +7,9 @@
 // obtain one at http://mozilla.org/MPL/2.0/.
 #ifndef IGL_OPENGL_TGA_H
 #define IGL_OPENGL_TGA_H
-#include "../igl_inline.h"
+#include "../../igl_inline.h"
 
-#include "gl.h"
+#include "../../opengl2/gl.h"
 // See license in tga.cpp
 /* tga.h - interface for TrueVision (TGA) image file loader */
 #include <stdio.h>

+ 7 - 6
shared/cmake/CMakeLists.txt

@@ -70,10 +70,11 @@ if(NOT EIGEN_INCLUDE_DIR)
 endif()
 list(APPEND LIBIGL_INCLUDE_DIRS "${EIGEN_INCLUDE_DIR}")
 
-macro(CompileIGL_Module module_dir prefix)
+macro(CompileIGL_Module module_dir )
   string(REPLACE "/" "_" module_name "${module_dir}")
   file(GLOB SOURCES_IGL_${module_name}
-  "${LIBIGL_SOURCE_DIR}/igl/${prefix}/${module_dir}/*.cpp"
+  "${LIBIGL_SOURCE_DIR}/igl/${module_dir}/*.cpp"
+  "${LIBIGL_SOURCE_DIR}/igl/copyleft/${module_dir}/*.cpp"
   )
   set(module_lib_name igl_${module_name})
   add_library(${module_lib_name} STATIC ${SOURCES_IGL_${module_name}})
@@ -168,7 +169,7 @@ if(LIBIGL_WITH_CGAL) # to be cleaned
   list(APPEND LIBIGL_CGAL_EXTRA_LIBRARIES ${CGAL_LIBRARIES})
   list(APPEND LIBIGL_EXTRA_LIBRARIES ${LIBIGL_CGAL_EXTRA_LIBRARIES})
   if(LIBIGL_USE_STATIC_LIBRARY)
-    CompileIGL_Module("cgal" "copyleft/")
+    CompileIGL_Module("cgal")
     target_include_directories(igl_cgal PRIVATE
       ${CGAL_3RD_PARTY_INCLUDE_DIRS}
       ${CGAL_INCLUDE_DIRS})
@@ -217,7 +218,7 @@ if(LIBIGL_WITH_COMISO)
         "${CMAKE_CURRENT_BINARY_DIR}/../libquadmath-0.dll")
   endif()
   if(LIBIGL_USE_STATIC_LIBRARY)
-    CompileIGL_Module("comiso" "copyleft/")
+    CompileIGL_Module("comiso")
     target_include_directories(igl_comiso PRIVATE ${COMISO_INCLUDE_DIRS})
     target_compile_definitions(igl_comiso PRIVATE -DINCLUDE_TEMPLATES)
   endif()
@@ -234,7 +235,7 @@ if(LIBIGL_WITH_CORK)
   list(APPEND LIBIGL_CORK_EXTRA_LIBRARIES "cork")
   list(APPEND LIBIGL_EXTRA_LIBRARIES ${LIBIGL_CORK_EXTRA_LIBRARIES})
   if(LIBIGL_USE_STATIC_LIBRARY)
-    CompileIGL_Module("cork" "copyleft/")
+    CompileIGL_Module("cork")
     target_include_directories(igl_cork PRIVATE ${CORK_INCLUDE_DIR})
   endif()
 endif()
@@ -447,7 +448,7 @@ if(LIBIGL_WITH_TETGEN)
   list(APPEND LIBIGL_EXTRA_LIBRARIES ${LIBIGL_TETGEN_EXTRA_LIBRARIES})
 
   if(LIBIGL_USE_STATIC_LIBRARY)
-    CompileIGL_Module("tetgen" "copyleft/")
+    CompileIGL_Module("tetgen")
     target_include_directories(igl_tetgen PRIVATE ${TETGEN_DIR})
   endif()
 endif()