More messing with cmake and veinlook

develop
Petr Mrázek 2010-03-23 23:53:46 +01:00
parent 1ad9dfea11
commit 8543d09c39
2 changed files with 11 additions and 8 deletions

@ -23,10 +23,10 @@ IF(CURSES_NEED_WIDE)
ENDIF(CURSES_NEED_WIDE) ENDIF(CURSES_NEED_WIDE)
FIND_LIBRARY(CURSES_CURSES_LIBRARY "${CURSES_LIBRARY_NAME}") FIND_LIBRARY(CURSES_CURSES_LIBRARY "${CURSES_LIBRARY_NAME}")
# MESSAGE(STATUS "CURSES! " ${CURSES_CURSES_LIBRARY}) #MESSAGE(STATUS "CURSES! " ${CURSES_CURSES_LIBRARY})
FIND_LIBRARY(CURSES_NCURSES_LIBRARY "${NCURSES_LIBRARY_NAME}") FIND_LIBRARY(CURSES_NCURSES_LIBRARY "${NCURSES_LIBRARY_NAME}")
# MESSAGE(STATUS "NCURSES! " ${CURSES_NCURSES_LIBRARY}) #MESSAGE(STATUS "NCURSES! " ${CURSES_NCURSES_LIBRARY})
SET(CURSES_USE_NCURSES FALSE) SET(CURSES_USE_NCURSES FALSE)
@ -58,7 +58,6 @@ IF(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
SET(CURSES_USE_NCURSES TRUE) SET(CURSES_USE_NCURSES TRUE)
ENDIF( CURSES_NCURSES_HAS_WSYNCUP) ENDIF( CURSES_NCURSES_HAS_WSYNCUP)
ENDIF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP) ENDIF(CURSES_NCURSES_LIBRARY AND NOT CURSES_CURSES_HAS_WSYNCUP)
ENDIF(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES) ENDIF(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
@ -104,7 +103,6 @@ ELSE(NOT CURSES_USE_NCURSES)
# only put ncurses include and library into # only put ncurses include and library into
# variables if they are found # variables if they are found
IF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY) IF(CURSES_NCURSES_INCLUDE_PATH AND CURSES_NCURSES_LIBRARY)
SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH} ${CURSES_NCURSESW_INCLUDE_PATH}" SET(CURSES_INCLUDE_PATH "${CURSES_NCURSES_INCLUDE_PATH} ${CURSES_NCURSESW_INCLUDE_PATH}"
CACHE FILEPATH "The curses include path") CACHE FILEPATH "The curses include path")
SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}" SET(CURSES_LIBRARY "${CURSES_NCURSES_LIBRARY}"

@ -58,9 +58,9 @@ TARGET_LINK_LIBRARIES(dfvecc dfhack)
IF(UNIX) IF(UNIX)
SET(CURSES_NEED_WIDE "YES") SET(CURSES_NEED_WIDE "YES")
SET(CURSES_USE_NCURSES "YES") SET(CURSES_NEED_NCURSES "YES")
find_package(Curses) find_package(Curses)
IF(CURSES_FOUND) IF(CURSES_FOUND)
if(CURSES_HAVE_NCURSESW_NCURSES_H) if(CURSES_HAVE_NCURSESW_NCURSES_H)
SET(NCURSES_H "ncursesw/ncurses.h") SET(NCURSES_H "ncursesw/ncurses.h")
@ -70,7 +70,7 @@ IF(UNIX)
SET(NCURSES_H "ncursesw.h") SET(NCURSES_H "ncursesw.h")
elseif(CURSES_HAVE_CURSESW_H) elseif(CURSES_HAVE_CURSESW_H)
SET(NCURSES_H "cursesw.h") SET(NCURSES_H "cursesw.h")
endif(CURSES_HAVE_NCURSESW_H) endif(CURSES_HAVE_NCURSESW_NCURSES_H)
IF(NCURSES_H) IF(NCURSES_H)
# OPTION( VARIABLE "Description" Initial state) # OPTION( VARIABLE "Description" Initial state)
#OPTION( WITH_FOO "Enable FOO support" ON ) #OPTION( WITH_FOO "Enable FOO support" ON )
@ -82,7 +82,13 @@ IF(UNIX)
ADD_EXECUTABLE(dfveinlook veinlook.cpp) ADD_EXECUTABLE(dfveinlook veinlook.cpp)
INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(dfveinlook dfhack ${CURSES_LIBRARIES}) TARGET_LINK_LIBRARIES(dfveinlook dfhack ${CURSES_LIBRARIES})
install(TARGETS
dfveinlook
RUNTIME DESTINATION bin
)
ENDIF(NCURSES_H) ENDIF(NCURSES_H)
ELSE(CURSES_FOUND)
MESSAGE(STATUS "Wide-character ncurses library not found - vainlook can't be built")
ENDIF(CURSES_FOUND) ENDIF(CURSES_FOUND)
ENDIF(UNIX) ENDIF(UNIX)
@ -101,7 +107,6 @@ dfmaterialtest
dfposition dfposition
dfrenamer dfrenamer
dfsuspend dfsuspend
dfveinlook
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
) )
ENDIF(UNIX) ENDIF(UNIX)