Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/cmake/macros.cmake')
-rw-r--r--build_files/cmake/macros.cmake80
1 files changed, 24 insertions, 56 deletions
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 2e3a1907063..06f47b9402b 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -403,9 +403,6 @@ function(setup_liblinks
if(WITH_SDL AND NOT WITH_SDL_DYNLOAD)
target_link_libraries(${target} ${SDL_LIBRARY})
endif()
- if(WITH_CODEC_QUICKTIME)
- target_link_libraries(${target} ${QUICKTIME_LIBRARIES})
- endif()
if(WITH_IMAGE_TIFF)
target_link_libraries(${target} ${TIFF_LIBRARY})
endif()
@@ -416,14 +413,7 @@ function(setup_liblinks
target_link_libraries(${target} ${OPENCOLORIO_LIBRARIES})
endif()
if(WITH_OPENSUBDIV OR WITH_CYCLES_OPENSUBDIV)
- if(WIN32 AND NOT UNIX)
- file_list_suffix(OPENSUBDIV_LIBRARIES_DEBUG "${OPENSUBDIV_LIBRARIES}" "_d")
- target_link_libraries_debug(${target} "${OPENSUBDIV_LIBRARIES_DEBUG}")
- target_link_libraries_optimized(${target} "${OPENSUBDIV_LIBRARIES}")
- unset(OPENSUBDIV_LIBRARIES_DEBUG)
- else()
target_link_libraries(${target} ${OPENSUBDIV_LIBRARIES})
- endif()
endif()
if(WITH_OPENVDB)
target_link_libraries(${target} ${OPENVDB_LIBRARIES} ${TBB_LIBRARIES})
@@ -498,6 +488,12 @@ function(setup_liblinks
target_link_libraries(${target} ${NDOF_LIBRARIES})
endif()
endif()
+ if(WITH_SYSTEM_GLOG)
+ target_link_libraries(${target} ${GLOG_LIBRARIES})
+ endif()
+ if(WITH_SYSTEM_GFLAGS)
+ target_link_libraries(${target} ${GFLAGS_LIBRARIES})
+ endif()
# We put CLEW and CUEW here because OPENSUBDIV_LIBRARIES dpeends on them..
if(WITH_CYCLES OR WITH_COMPOSITOR OR WITH_OPENSUBDIV)
@@ -602,6 +598,7 @@ function(SETUP_BLENDER_SORTED_LIBS)
bf_freestyle
bf_ikplugin
bf_modifiers
+ bf_alembic
bf_bmesh
bf_gpu
bf_blenloader
@@ -620,7 +617,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
bf_imbuf_openimageio
bf_imbuf_dds
bf_collada
- bf_alembic
bf_intern_elbeem
bf_intern_memutil
bf_intern_guardedalloc
@@ -665,13 +661,19 @@ function(SETUP_BLENDER_SORTED_LIBS)
extern_rangetree
extern_wcwidth
bf_intern_libmv
- extern_glog
- extern_gflags
extern_sdlew
bf_intern_glew_mx
)
+ if(NOT WITH_SYSTEM_GLOG)
+ list(APPEND BLENDER_SORTED_LIBS extern_glog)
+ endif()
+
+ if(NOT WITH_SYSTEM_GFLAGS)
+ list(APPEND BLENDER_SORTED_LIBS extern_gflags)
+ endif()
+
if(WITH_COMPOSITOR)
# added for opencl compositor
list_insert_before(BLENDER_SORTED_LIBS "bf_blenkernel" "bf_compositor")
@@ -710,10 +712,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
list(APPEND BLENDER_SORTED_LIBS bf_intern_itasc)
endif()
- if(WITH_CODEC_QUICKTIME)
- list(APPEND BLENDER_SORTED_LIBS bf_quicktime)
- endif()
-
if(WITH_MOD_BOOLEAN)
list(APPEND BLENDER_SORTED_LIBS extern_carve)
endif()
@@ -1242,17 +1240,6 @@ endfunction()
# hacks to override initial project settings
# these macros must be called directly before/after project(Blender)
macro(blender_project_hack_pre)
- # ----------------
- # MINGW HACK START
- # ignore system set flag, use our own
- # must be before project(...)
- # if the user wants to add their own its ok after first run.
- if(DEFINED CMAKE_C_STANDARD_LIBRARIES)
- set(_reset_standard_libraries OFF)
- else()
- set(_reset_standard_libraries ON)
- endif()
-
# ------------------
# GCC -O3 HACK START
# needed because O3 can cause problems but
@@ -1271,25 +1258,6 @@ endmacro()
macro(blender_project_hack_post)
- # --------------
- # MINGW HACK END
- if(_reset_standard_libraries)
- # Must come after projecINCt(...)
- #
- # MINGW workaround for -ladvapi32 being included which surprisingly causes
- # string formatting of floats, eg: printf("%.*f", 3, value). to crash blender
- # with a meaningless stack trace. by overriding this flag we ensure we only
- # have libs we define.
- set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
- set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
- mark_as_advanced(
- CMAKE_C_STANDARD_LIBRARIES
- CMAKE_CXX_STANDARD_LIBRARIES
- )
- endif()
- unset(_reset_standard_libraries)
-
-
# ----------------
# GCC -O3 HACK END
if(_reset_standard_cflags_rel)
@@ -1581,24 +1549,24 @@ macro(openmp_delayload
endmacro()
MACRO(WINDOWS_SIGN_TARGET target)
- if (WITH_WINDOWS_CODESIGN)
- if (!SIGNTOOL_EXE)
+ if(WITH_WINDOWS_CODESIGN)
+ if(!SIGNTOOL_EXE)
error("Codesigning is enabled, but signtool is not found")
else()
- if (WINDOWS_CODESIGN_PFX_PASSWORD)
+ if(WINDOWS_CODESIGN_PFX_PASSWORD)
set(CODESIGNPASSWORD /p ${WINDOWS_CODESIGN_PFX_PASSWORD})
else()
- if ($ENV{PFXPASSWORD})
+ if($ENV{PFXPASSWORD})
set(CODESIGNPASSWORD /p $ENV{PFXPASSWORD})
else()
- message( FATAL_ERROR "WITH_WINDOWS_CODESIGN is on but WINDOWS_CODESIGN_PFX_PASSWORD not set, and environment variable PFXPASSWORD not found, unable to sign code.")
+ message(FATAL_ERROR "WITH_WINDOWS_CODESIGN is on but WINDOWS_CODESIGN_PFX_PASSWORD not set, and environment variable PFXPASSWORD not found, unable to sign code.")
endif()
endif()
add_custom_command(TARGET ${target}
- POST_BUILD
- COMMAND ${SIGNTOOL_EXE} sign /f ${WINDOWS_CODESIGN_PFX} ${CODESIGNPASSWORD} $<TARGET_FILE:${target}>
- VERBATIM
- )
+ POST_BUILD
+ COMMAND ${SIGNTOOL_EXE} sign /f ${WINDOWS_CODESIGN_PFX} ${CODESIGNPASSWORD} $<TARGET_FILE:${target}>
+ VERBATIM
+ )
endif()
endif()
ENDMACRO()