CMake: only include licences for enabled libs
authorCampbell Barton <ideasman42@gmail.com>
Mon, 21 May 2018 16:41:59 +0000 (18:41 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 21 May 2018 16:41:59 +0000 (18:41 +0200)
source/creator/CMakeLists.txt

index a71c1bb198465a459d00c2fb655062fdd421f660..47016cbbb3bc43abb0db210417503d047709e3ee 100644 (file)
@@ -265,15 +265,30 @@ endif()
 set(BLENDER_TEXT_FILES
        ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt
        ${CMAKE_SOURCE_DIR}/release/text/GPL3-license.txt
-       ${CMAKE_SOURCE_DIR}/release/text/Python-license.txt
        ${CMAKE_SOURCE_DIR}/release/text/copyright.txt
-       ${CMAKE_SOURCE_DIR}/release/text/jemalloc-license.txt
-       ${CMAKE_SOURCE_DIR}/release/text/ocio-license.txt
        # generate this file
        # ${CMAKE_SOURCE_DIR}/release/text/readme.html
        ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-bfont.ttf.txt
 )
 
+if(WITH_PYTHON)
+       list(APPEND BLENDER_TEXT_FILES
+               ${CMAKE_SOURCE_DIR}/release/text/Python-license.txt
+       )
+endif()
+
+if(WITH_OPENCOLORIO)
+       list(APPEND BLENDER_TEXT_FILES
+               ${CMAKE_SOURCE_DIR}/release/text/ocio-license.txt
+       )
+endif()
+
+if(WITH_MEM_JEMALLOC)
+       list(APPEND BLENDER_TEXT_FILES
+               ${CMAKE_SOURCE_DIR}/release/text/jemalloc-license.txt
+       )
+endif()
+
 if(WITH_INTERNATIONAL)
        list(APPEND BLENDER_TEXT_FILES
                ${CMAKE_SOURCE_DIR}/release/datafiles/LICENSE-droidsans.ttf.txt