CMakeLists.txt
branchstable-2.0
changeset 1132 ff6943f29c3e
parent 1082 94771621792f
child 1141 2ad0dd5a701f
--- a/CMakeLists.txt	Fri Aug 20 02:46:14 2010 -0400
+++ b/CMakeLists.txt	Thu Dec 30 19:45:47 2010 -0500
@@ -108,7 +108,9 @@
     # We add this explicitly, since we don't want CMake to think this
     #  is a C++ project unless we're on BeOS.
     SET(PHYSFS_BEOS_SRCS platform/beos.cpp)
-    SET(OPTIONAL_LIBRARY_LIBS ${OPTIONAL_LIBRARY_LIBS} be root)
+    FIND_LIBRARY(BE_LIBRARY be)
+    FIND_LIBRARY(ROOT_LIBRARY root)
+    SET(OPTIONAL_LIBRARY_LIBS ${OPTIONAL_LIBRARY_LIBS} ${BE_LIBRARY} ${ROOT_LIBRARY})
 ENDIF(BEOS)
 
 # Almost everything is "compiled" here, but things that don't apply to the
@@ -298,7 +300,8 @@
     FIND_PATH(READLINE_H readline/readline.h)
     FIND_PATH(HISTORY_H readline/history.h)
     IF(READLINE_H AND HISTORY_H)
-        SET(CMAKE_REQUIRED_LIBRARIES curses)
+        FIND_LIBRARY(CURSES_LIBRARY NAMES curses ncurses)
+        SET(CMAKE_REQUIRED_LIBRARIES ${CURSES_LIBRARY})
         FIND_LIBRARY(READLINE_LIBRARY readline)
         FIND_LIBRARY(HISTORY_LIBRARY history)
         IF(READLINE_LIBRARY AND HISTORY_LIBRARY)