[brlcad-commits] SF.net SVN: brlcad:[40016] brlcad/branches/cmake/CMakeLists.txt
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <sta...@us...> - 2010-08-05 13:16:15
|
Revision: 40016 http://brlcad.svn.sourceforge.net/brlcad/?rev=40016&view=rev Author: starseeker Date: 2010-08-05 13:16:08 +0000 (Thu, 05 Aug 2010) Log Message: ----------- Start looking for libraries Modified Paths: -------------- brlcad/branches/cmake/CMakeLists.txt Modified: brlcad/branches/cmake/CMakeLists.txt =================================================================== --- brlcad/branches/cmake/CMakeLists.txt 2010-08-05 12:12:55 UTC (rev 40015) +++ brlcad/branches/cmake/CMakeLists.txt 2010-08-05 13:16:08 UTC (rev 40016) @@ -260,12 +260,16 @@ # macro to help with those cases. INCLUDE(${BRLCAD_CMAKE_DIR}/BRLCAD_Dependent_Options.cmake) +INCLUDE(${BRLCAD_CMAKE_DIR}/BRLCAD_ConfigFile.cmake) + OPTION(BRLCAD-BUILD_BENCHMARK_ONLY "Only build benchmark." OFF) MARK_AS_ADVANCED(BRLCAD-BUILD_BENCHMARK_ONLY) OPTION(BRLCAD-BUILD_RTSERVER_ONLY "Only build rtserver." OFF) MARK_AS_ADVANCED(BRLCAD-BUILD_RTSERVER_ONLY) +INCLUDE (CheckLibraryExists) + # Need to work on this - CMake can detect flex and bison, but apparently not # generic lex/yacc - need to update the Wireshark files to be a a graceful # fallback to the FLEX/BISON logic, and (perhaps) wrap both in some way to @@ -279,14 +283,31 @@ INCLUDE(${BRLCAD_CMAKE_DIR}/FindYACC.cmake) endif (NOT BISON_FOUND) +# First, use CMake techniques for finding libraries that BRL-CAD +# doesn't supply locally +find_package(Threads) +# This may be overkill - does CHECK_LIBRARY_EXISTS usably set +# anything for us? +set(LIBBSD "") +CHECK_LIBRARY_EXISTS(bsd daemon "" HAVE_BSDDAEMON) +if (NOT HAVE_BSDDAEMON) + CHECK_LIBRARY_EXISTS(c daemon "" HAVE_CDAEMON) +endif (NOT HAVE_BSDDAEMON) +if (HAVE_BSDDAEMON) + set(LIBBSD "-lbsd") +endif (HAVE_BSDDAEMON) +if (HAVE_CDAEMON) + set(LIBBSD "-c") +endif (HAVE_CDAEMON) + + # This is the top level control property for handling library building set(BRLCAD-BUILD_SRC_OTHER "Auto" CACHE STRING "Set build type" FORCE) set_property(CACHE BRLCAD-BUILD_SRC_OTHER PROPERTY STRINGS "Yes" "No" "Auto") -INCLUDE(${BRLCAD_CMAKE_DIR}/BRLCAD_ConfigFile.cmake) BRLCAD_FUNCTION_EXISTS(drand48 HAVE_DRAND48) BRLCAD_FUNCTION_EXISTS(strchr HAVE_STRCHR) BRLCAD_FUNCTION_EXISTS(kill HAVE_KILL) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |