[Bf-blender-cvs] [619600a53f6] blender2.8: CMake: cleanup

Campbell Barton noreply at git.blender.org
Mon Oct 30 08:44:21 CET 2017


Commit: 619600a53f6d28f640d56117ef928a8cdb8b08ba
Author: Campbell Barton
Date:   Mon Oct 30 12:58:44 2017 +1100
Branches: blender2.8
https://developer.blender.org/rB619600a53f6d28f640d56117ef928a8cdb8b08ba

CMake: cleanup

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

M	CMakeLists.txt
M	build_files/buildbot/config/blender_linux.cmake
M	build_files/cmake/macros.cmake
M	build_files/cmake/platform/platform_win32.cmake
M	extern/CMakeLists.txt

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

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a19c52be0d..742383a9ded 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1608,10 +1608,10 @@ include(build_files/cmake/packaging.cmake)
 # Use dynamic loading for OpenMP
 if(WITH_BLENDER)
 	openmp_delayload(blender)
-endif(WITH_BLENDER)
+endif()
 if(WITH_PLAYER)
 	openmp_delayload(blenderplayer)
-endif(WITH_PLAYER)
+endif()
 
 #-----------------------------------------------------------------------------
 # Print Final Configuration
diff --git a/build_files/buildbot/config/blender_linux.cmake b/build_files/buildbot/config/blender_linux.cmake
index 53e841ba536..22e88a82ffd 100644
--- a/build_files/buildbot/config/blender_linux.cmake
+++ b/build_files/buildbot/config/blender_linux.cmake
@@ -5,15 +5,15 @@ include("${CMAKE_CURRENT_LIST_DIR}/../../cmake/config/blender_full.cmake")
 # Detect which libc we'll be linking against.
 # Some of the paths will depend on this
 
-if (EXISTS "/lib/x86_64-linux-gnu/libc-2.19.so")
+if(EXISTS "/lib/x86_64-linux-gnu/libc-2.19.so")
 	message(STATUS "Building in GLibc-2.19 environment")
 	set(GLIBC "2.19")
 	set(MULTILIB "/x86_64-linux-gnu")
-elseif (EXISTS "/lib/i386-linux-gnu//libc-2.19.so")
+elseif(EXISTS "/lib/i386-linux-gnu//libc-2.19.so")
 	message(STATUS "Building in GLibc-2.19 environment")
 	set(GLIBC "2.19")
 	set(MULTILIB "/i386-linux-gnu")
-elseif (EXISTS "/lib/libc-2.11.3.so")
+elseif(EXISTS "/lib/libc-2.11.3.so")
 	message(STATUS "Building in GLibc-2.11 environment")
 	set(GLIBC "2.11")
 	set(MULTILIB "")
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index afe5a2cdc72..c79755bee9d 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -282,7 +282,7 @@ function(SETUP_LIBDIRS)
 	# NOTE: For all new libraries, use absolute library paths.
 	# This should eventually be phased out.
 
-	if (NOT MSVC)
+	if(NOT MSVC)
 		link_directories(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH})
 
 		if(WITH_PYTHON)  #  AND NOT WITH_PYTHON_MODULE  # WIN32 needs
@@ -342,7 +342,7 @@ function(SETUP_LIBDIRS)
 		if(WIN32 AND NOT UNIX)
 			link_directories(${PTHREADS_LIBPATH})
 		endif()
-	endif(NOT MSVC)
+	endif()
 endfunction()
 
 function(setup_liblinks
@@ -1562,8 +1562,8 @@ macro(openmp_delayload
 				SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_DEBUG "/DELAYLOAD:${OPENMP_DLL_NAME}d.dll delayimp.lib")
 				SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
 				SET_TARGET_PROPERTIES(${projectname} PROPERTIES LINK_FLAGS_MINSIZEREL "/DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
-			endif(WITH_OPENMP)
-		endif(MSVC)
+			endif()
+		endif()
 endmacro()
 
 MACRO(WINDOWS_SIGN_TARGET target)
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index 840534a254a..5cc5fb8c7d6 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -35,14 +35,14 @@ macro(warn_hardcoded_paths package_name
 	)
 	if(WITH_WINDOWS_FIND_MODULES)
 		message(WARNING "Using HARDCODED ${package_name} locations")
-	endif(WITH_WINDOWS_FIND_MODULES)
+	endif()
 endmacro()
 
 macro(windows_find_package package_name
 	)
 	if(WITH_WINDOWS_FIND_MODULES)
 		find_package(${package_name})
-	endif(WITH_WINDOWS_FIND_MODULES)
+	endif()
 endmacro()
 
 macro(find_package_wrapper)
@@ -338,9 +338,9 @@ if(WITH_BOOST)
 	set(Boost_USE_STATIC_RUNTIME ON) # prefix lib
 	set(Boost_USE_MULTITHREADED ON) # suffix -mt
 	set(Boost_USE_STATIC_LIBS ON) # suffix -s
-	if (WITH_WINDOWS_FIND_MODULES)
+	if(WITH_WINDOWS_FIND_MODULES)
 		find_package(Boost COMPONENTS date_time filesystem thread regex system ${boost_extra_libs})
-	endif (WITH_WINDOWS_FIND_MODULES)
+	endif()
 	if(NOT Boost_FOUND)
 		warn_hardcoded_paths(BOOST)
 		set(BOOST ${LIBDIR}/boost)
diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt
index 0e4853ee458..65958eee6f7 100644
--- a/extern/CMakeLists.txt
+++ b/extern/CMakeLists.txt
@@ -99,7 +99,7 @@ if(WITH_LIBMV)
 endif()
 
 if(WITH_LIBMV OR WITH_GTESTS OR (WITH_CYCLES AND WITH_CYCLES_LOGGING))
-	if (NOT WITH_SYSTEM_GFLAGS)
+	if(NOT WITH_SYSTEM_GFLAGS)
 		add_subdirectory(gflags)
 	endif()
 	add_subdirectory(glog)



More information about the Bf-blender-cvs mailing list