Skip to content

Commit

Permalink
don't put *_LIBRARIES cmake variables into the cache
Browse files Browse the repository at this point in the history
Each found and/or user-definable library is stored in the cached
as <library>_LIBRARY. The *_LIBRARIES variables do not belong there.
  • Loading branch information
hsattler authored and holtmann committed Oct 6, 2008
1 parent 40cd4e3 commit 22c3fff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
1 change: 0 additions & 1 deletion CMakeModules/FindGlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ if ( PKG_CONFIG_GLIB_FOUND )
endif ( ${i}_LIBRARY )
mark_as_advanced ( ${i}_LIBRARY )
endforeach ( i )
set ( Glib_LIBRARIES "${Glib_LIBRARIES}" CACHE STRING "" )
mark_as_advanced ( Glib_LIBRARIES )

else ( PKG_CONFIG_GLIB_FOUND )
Expand Down
17 changes: 7 additions & 10 deletions CMakeModules/FindLibUSB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ if ( PKGCONFIG_LIBUSB_FOUND )
endif ( ${i}_LIBRARY )
mark_as_advanced ( ${i}_LIBRARY )
endforeach ( i )
set ( LibUSB_LIBRARIES "${LibUSB_LIBRARIES}" CACHE STRING "" )
mark_as_advanced ( LibUSB_LIBRARIES )

else ( PKGCONFIG_LIBUSB_FOUND )
find_path ( LibUSB_INCLUDE_DIRS
Expand Down Expand Up @@ -64,7 +62,7 @@ else ( PKGCONFIG_LIBUSB_FOUND )
endif ( MSVC )
endif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )

find_library ( LibUSB_LIBRARIES
find_library ( usb_LIBRARY
NAMES
libusb usb
PATHS
Expand All @@ -73,15 +71,14 @@ else ( PKGCONFIG_LIBUSB_FOUND )
PATH_SUFFIXES
${LibUSB_LIBRARY_PATH_SUFFIX}
)
mark_as_advanced ( LibUSB_LIBRARIES )
if ( LibUSB_LIBRARIES )
get_filename_component ( LibUSB_LIBRARY_DIRS ${LibUSB_LIBRARIES} PATH )
endif ( LibUSB_LIBRARIES )
# message ( STATUS "LibUSB library: ${LibUSB_LIBRARY_DIRS}" )
mark_as_advanced ( usb_LIBRARY )
if ( usb_LIBRARY )
set ( LibUSB_LIBRARIES ${usb_LIBRARY} )
endif ( usb_LIBRARY )

if ( LibUSB_INCLUDE_DIRS AND LibUSB_LIBRARY_DIRS )
if ( LibUSB_INCLUDE_DIRS AND LibUSB_LIBRARIES )
set ( LibUSB_FOUND true )
endif ( LibUSB_INCLUDE_DIRS AND LibUSB_LIBRARY_DIRS )
endif ( LibUSB_INCLUDE_DIRS AND LibUSB_LIBRARIES )
endif ( PKGCONFIG_LIBUSB_FOUND )

if ( LibUSB_FOUND )
Expand Down

0 comments on commit 22c3fff

Please sign in to comment.