Revision: 68954
          http://sourceforge.net/p/brlcad/code/68954
Author:   brlcad
Date:     2016-10-01 02:05:11 +0000 (Sat, 01 Oct 2016)
Log Message:
-----------
check_library_exists() already respects cmake_required_flags, so let it get set 
when the cppflag is set.

Modified Paths:
--------------
    brlcad/trunk/CMakeLists.txt
    brlcad/trunk/misc/CMake/BRLCAD_CheckFunctions.cmake

Modified: brlcad/trunk/CMakeLists.txt
===================================================================
--- brlcad/trunk/CMakeLists.txt 2016-10-01 01:59:18 UTC (rev 68953)
+++ brlcad/trunk/CMakeLists.txt 2016-10-01 02:05:11 UTC (rev 68954)
@@ -675,6 +675,9 @@
     set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} /usr/local/include)
     include_directories(AFTER SYSTEM /usr/local/include)
   endif (IS_DIRECTORY /usr/local/include)
+  if (IS_DIRECTORY /usr/local/lib)
+    set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} -L/usr/local/lib)
+  endif (IS_DIRECTORY /usr/local/lib)
 endif (IS_DIRECTORY /usr/local)
 
 #---------------------------------------------------------------------

Modified: brlcad/trunk/misc/CMake/BRLCAD_CheckFunctions.cmake
===================================================================
--- brlcad/trunk/misc/CMake/BRLCAD_CheckFunctions.cmake 2016-10-01 01:59:18 UTC 
(rev 68953)
+++ brlcad/trunk/misc/CMake/BRLCAD_CheckFunctions.cmake 2016-10-01 02:05:11 UTC 
(rev 68954)
@@ -257,10 +257,7 @@
   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

Reply via email to