Revision: 68953
http://sourceforge.net/p/brlcad/code/68953
Author: brlcad
Date: 2016-10-01 01:59:18 +0000 (Sat, 01 Oct 2016)
Log Message:
-----------
make CHECK_LIBRARY_EXISTS() respect the CMAKE_PREFIX_PATH during linking like
find_library() does
Modified Paths:
--------------
brlcad/trunk/misc/CMake/BRLCAD_CheckFunctions.cmake
Modified: brlcad/trunk/misc/CMake/BRLCAD_CheckFunctions.cmake
===================================================================
--- brlcad/trunk/misc/CMake/BRLCAD_CheckFunctions.cmake 2016-09-30 22:05:27 UTC
(rev 68952)
+++ brlcad/trunk/misc/CMake/BRLCAD_CheckFunctions.cmake 2016-10-01 01:59:18 UTC
(rev 68953)
@@ -257,7 +257,10 @@
set(CMAKE_C_FLAGS_TMP "${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS "")
if(NOT ${targetname}_LIBRARY)
+ set(CMAKE_REQUIRED_FLAGS_TMP "${CMAKE_REQUIRED_FLAGS}")
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}
-L${CMAKE_PREFIX_PATH}/lib")
CHECK_LIBRARY_EXISTS(${lname} ${func} "" HAVE_${targetname}_${lname})
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS_TMP}")
if(HAVE_${targetname}_${lname})
set(${targetname}_LIBRARY "${lname}")
endif(HAVE_${targetname}_${lname})
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits