[Cmake-commits] CMake branch, master, updated. v3.12.2-733-ga57225c
Kitware Robot
kwrobot at kitware.com
Wed Sep 26 10:15:05 EDT 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via a57225c4fc5cbbf063d86e0f911c552bc0fabb9d (commit)
via c8137850445d180bd5f3b55d4f9e80d9cbcf0baa (commit)
via 98dfdab19c07cf795678000c1681ea063843b0ed (commit)
via 0da645d4523474093f36d66722dfcd3aa008a40d (commit)
from 5f702f97a89129a39bcf1ecf9823d60a2793e35e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a57225c4fc5cbbf063d86e0f911c552bc0fabb9d
commit a57225c4fc5cbbf063d86e0f911c552bc0fabb9d
Merge: c813785 98dfdab
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 26 14:06:29 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Sep 26 10:07:01 2018 -0400
Merge topic 'FindLua-names-per-dir'
98dfdab19c FindLua: Search for all library names in each path
Acked-by: Kitware Robot <kwrobot at kitware.com>
Acked-by: Rolf Eike Beer <eike at sf-mail.de>
Merge-request: !2412
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c8137850445d180bd5f3b55d4f9e80d9cbcf0baa
commit c8137850445d180bd5f3b55d4f9e80d9cbcf0baa
Merge: 5f702f9 0da645d
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 26 14:06:15 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Sep 26 10:06:21 2018 -0400
Merge topic 'FindGLUT-windows-debug'
0da645d452 FindGLUT: Find debug/release variants on Windows
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !2398
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98dfdab19c07cf795678000c1681ea063843b0ed
commit 98dfdab19c07cf795678000c1681ea063843b0ed
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 25 09:32:45 2018 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Sep 25 09:32:45 2018 -0400
FindLua: Search for all library names in each path
Add the `NAMES_PER_DIR` option to our `find_library` call so that all
names are considered in each path as we proceed through the search.
This allows locally-built unversioned libraries to be found before
versioned system libraries if they appear earlier in the set of paths to
be searched.
Suggested-by: Alan W. Irwin <irwin at beluga.phys.uvic.ca>
diff --git a/Modules/FindLua.cmake b/Modules/FindLua.cmake
index e86c15c..68530b3 100644
--- a/Modules/FindLua.cmake
+++ b/Modules/FindLua.cmake
@@ -198,6 +198,7 @@ endif ()
find_library(LUA_LIBRARY
NAMES ${_lua_library_names} lua
+ NAMES_PER_DIR
HINTS
ENV LUA_DIR
PATH_SUFFIXES lib
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0da645d4523474093f36d66722dfcd3aa008a40d
commit 0da645d4523474093f36d66722dfcd3aa008a40d
Author: Kohányi Róbert <kohanyi.robert at gmail.com>
AuthorDate: Tue Sep 18 11:02:45 2018 +0200
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Sep 25 09:00:54 2018 -0400
FindGLUT: Find debug/release variants on Windows
* Separate find_library calls to find Release and Debug libs.
* Using select_library_configurations to properly populate required
variables (similar to FindZLIB).
* Setting Release and Debug specific properties
(IMPORTED_CONFIGURATIONS_<CONFIG> and IMPORTED_LOCATION_<CONFIG>).
* Falling back to setting just IMPORTED_LOCATION if
GLUT_glut_LIBRARY_RELEASE or GLUT_glut_LIBRARY_DEBUG are not defined.
This enables proper linking on Windows.
Fixes: #17037
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake
index 88d4b29..1779683 100644
--- a/Modules/FindGLUT.cmake
+++ b/Modules/FindGLUT.cmake
@@ -34,20 +34,30 @@
# GLUT_Xmu_LIBRARY = the full path to the Xmu library.
# GLUT_Xi_LIBRARY = the full path to the Xi Library.
+include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+
if (WIN32)
find_path( GLUT_INCLUDE_DIR NAMES GL/glut.h
PATHS ${GLUT_ROOT_PATH}/include )
- find_library( GLUT_glut_LIBRARY NAMES glut glut32 freeglut
+ find_library( GLUT_glut_LIBRARY_RELEASE NAMES glut glut32 freeglut
PATHS
${OPENGL_LIBRARY_DIR}
${GLUT_ROOT_PATH}/Release
)
+ find_library( GLUT_glut_LIBRARY_DEBUG NAMES freeglutd
+ PATHS
+ ${OPENGL_LIBRARY_DIR}
+ ${GLUT_ROOT_PATH}/Debug
+ )
+ mark_as_advanced(GLUT_glut_LIBRARY_RELEASE GLUT_glut_LIBRARY_DEBUG)
+ select_library_configurations(GLUT_glut)
else ()
if (APPLE)
find_path(GLUT_INCLUDE_DIR glut.h ${OPENGL_LIBRARY_DIR})
find_library(GLUT_glut_LIBRARY GLUT DOC "GLUT library for OSX")
find_library(GLUT_cocoa_LIBRARY Cocoa DOC "Cocoa framework for OSX")
+ mark_as_advanced(GLUT_glut_LIBRARY GLUT_cocoa_LIBRARY)
if(GLUT_cocoa_LIBRARY AND NOT TARGET GLUT::Cocoa)
add_library(GLUT::Cocoa UNKNOWN IMPORTED)
@@ -72,10 +82,12 @@ else ()
find_library( GLUT_Xi_LIBRARY Xi
/usr/openwin/lib
)
+ mark_as_advanced(GLUT_Xi_LIBRARY)
find_library( GLUT_Xmu_LIBRARY Xmu
/usr/openwin/lib
)
+ mark_as_advanced(GLUT_Xmu_LIBRARY)
if(GLUT_Xi_LIBRARY AND NOT TARGET GLUT::Xi)
add_library(GLUT::Xi UNKNOWN IMPORTED)
@@ -104,6 +116,7 @@ else ()
/usr/openwin/lib
${_GLUT_glut_LIB_DIR}
)
+ mark_as_advanced(GLUT_glut_LIBRARY)
unset(_GLUT_INC_DIR)
unset(_GLUT_glut_LIB_DIR)
@@ -135,8 +148,24 @@ if (GLUT_FOUND)
set_target_properties(GLUT::GLUT PROPERTIES
IMPORTED_LOCATION "${GLUT_glut_LIBRARY}/${CMAKE_MATCH_1}")
else()
- set_target_properties(GLUT::GLUT PROPERTIES
- IMPORTED_LOCATION "${GLUT_glut_LIBRARY}")
+ if(GLUT_glut_LIBRARY_RELEASE)
+ set_property(TARGET GLUT::GLUT APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS RELEASE)
+ set_target_properties(GLUT::GLUT PROPERTIES
+ IMPORTED_LOCATION_RELEASE "${GLUT_glut_LIBRARY_RELEASE}")
+ endif()
+
+ if(GLUT_glut_LIBRARY_DEBUG)
+ set_property(TARGET GLUT::GLUT APPEND PROPERTY
+ IMPORTED_CONFIGURATIONS DEBUG)
+ set_target_properties(GLUT::GLUT PROPERTIES
+ IMPORTED_LOCATION_DEBUG "${GLUT_glut_LIBRARY_DEBUG}")
+ endif()
+
+ if(NOT GLUT_glut_LIBRARY_RELEASE AND NOT GLUT_glut_LIBRARY_DEBUG)
+ set_property(TARGET GLUT::GLUT APPEND PROPERTY
+ IMPORTED_LOCATION "${GLUT_glut_LIBRARY}")
+ endif()
endif()
if(TARGET GLUT::Xmu)
@@ -160,9 +189,4 @@ if (GLUT_FOUND)
set (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
endif()
-mark_as_advanced(
- GLUT_INCLUDE_DIR
- GLUT_glut_LIBRARY
- GLUT_Xmu_LIBRARY
- GLUT_Xi_LIBRARY
- )
+mark_as_advanced(GLUT_INCLUDE_DIR)
-----------------------------------------------------------------------
Summary of changes:
Modules/FindGLUT.cmake | 42 +++++++++++++++++++++++++++++++++---------
Modules/FindLua.cmake | 1 +
2 files changed, 34 insertions(+), 9 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list