2010-02-15 23:21:38 -07:00
|
|
|
# don't use this file directly. use the one in the root folder of the project
|
|
|
|
|
|
|
|
# this is required to ensure we use the right configuration for the system.
|
|
|
|
IF(UNIX)
|
|
|
|
add_definitions(-DLINUX_BUILD)
|
|
|
|
ENDIF(UNIX)
|
|
|
|
|
|
|
|
# attachtest - 100x attach/detach, suspend/resume
|
|
|
|
ADD_EXECUTABLE(dfattachtest attachtest.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfattachtest dfhack)
|
|
|
|
|
2010-04-02 19:52:46 -06:00
|
|
|
# buildingsdump - dump buildings and their raw data filtered by type
|
2010-04-09 06:44:00 -06:00
|
|
|
ADD_EXECUTABLE(dfbuildingsdump buildingsdump.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfbuildingsdump dfhack)
|
2010-04-02 19:52:46 -06:00
|
|
|
|
2010-04-09 16:24:41 -06:00
|
|
|
# constructiondump - dump constructions!
|
|
|
|
ADD_EXECUTABLE(dfconstructiondump construction_dump.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfconstructiondump dfhack)
|
|
|
|
|
2010-02-15 23:21:38 -07:00
|
|
|
# a benchmark program, reads the map 1000x
|
|
|
|
ADD_EXECUTABLE(dfexpbench expbench.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfexpbench dfhack)
|
|
|
|
|
|
|
|
# creaturedump - basic creature dump - a test of the creature related exports
|
2010-04-04 04:29:56 -06:00
|
|
|
ADD_EXECUTABLE(dfcreaturedump creaturedump.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfcreaturedump dfhack)
|
2010-02-15 23:21:38 -07:00
|
|
|
|
|
|
|
# materialtest - just list the first material of each type
|
|
|
|
ADD_EXECUTABLE(dfmaterialtest materialtest.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfmaterialtest dfhack)
|
|
|
|
|
|
|
|
# position - check the DF window and cursor parameters
|
|
|
|
ADD_EXECUTABLE(dfposition position.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfposition dfhack)
|
|
|
|
|
2010-03-26 05:20:30 -06:00
|
|
|
# suspendtest - test if suspend works. df should stop responding when suspended
|
|
|
|
# by dfhack
|
2010-02-15 23:21:38 -07:00
|
|
|
ADD_EXECUTABLE(dfsuspend suspendtest.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfsuspend dfhack)
|
|
|
|
|
|
|
|
# itemdump - dump the item under the cursor
|
2010-04-29 09:00:34 -06:00
|
|
|
ADD_EXECUTABLE(dfitemdump dfitemdump.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfitemdump dfhack)
|
2010-02-15 23:21:38 -07:00
|
|
|
|
2010-02-17 16:33:08 -07:00
|
|
|
# hotkeynotedump - dumps the hotkeys and notes for the loaded map
|
|
|
|
# Author: belal
|
2010-04-10 18:32:50 -06:00
|
|
|
ADD_EXECUTABLE(dfhotkeynotedump hotkeynotedump.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfhotkeynotedump dfhack)
|
2010-02-17 16:33:08 -07:00
|
|
|
|
2010-02-20 22:40:30 -07:00
|
|
|
# findnameindexes
|
|
|
|
# Author: belal
|
2010-03-26 05:20:30 -06:00
|
|
|
#ADD_EXECUTABLE(dffindnameindexes findnameindexes.cpp)
|
|
|
|
#TARGET_LINK_LIBRARIES(dffindnameindexes dfhack)
|
2010-02-20 22:40:30 -07:00
|
|
|
|
2010-02-22 19:25:57 -07:00
|
|
|
# settlementdump - dumps the settlements on the loaded map
|
|
|
|
# Author: belal
|
2010-04-02 19:52:46 -06:00
|
|
|
# ADD_EXECUTABLE(dfsettlementdump settlementdump.cpp)
|
|
|
|
# TARGET_LINK_LIBRARIES(dfsettlementdump dfhack)
|
2010-02-22 19:25:57 -07:00
|
|
|
|
2010-03-05 14:19:27 -07:00
|
|
|
# veccheck - read vector values at address
|
2010-04-02 07:47:08 -06:00
|
|
|
ADD_EXECUTABLE(dfvecc veccheck.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfvecc dfhack)
|
2010-03-05 14:19:27 -07:00
|
|
|
|
2010-04-07 08:45:38 -06:00
|
|
|
# treedump - dump them trees!
|
|
|
|
ADD_EXECUTABLE(dftreedump treedump.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dftreedump dfhack)
|
|
|
|
|
2010-04-07 14:28:05 -06:00
|
|
|
# spatterdump - dump spatter 'veins'
|
|
|
|
ADD_EXECUTABLE(dfspatterdump spatterdump.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfspatterdump dfhack)
|
|
|
|
|
2010-04-15 05:04:58 -06:00
|
|
|
# catsplosion - Accelerates pregnancy
|
2010-03-25 19:40:17 -06:00
|
|
|
# Author: Zhentar
|
2010-04-15 05:04:58 -06:00
|
|
|
ADD_EXECUTABLE(dfcatsplosion catsplosion.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfcatsplosion dfhack)
|
2010-04-02 19:52:46 -06:00
|
|
|
|
2010-05-03 20:47:06 -06:00
|
|
|
# flows - check flows impact on fps
|
|
|
|
ADD_EXECUTABLE(dfflows flows.cpp)
|
|
|
|
TARGET_LINK_LIBRARIES(dfflows dfhack)
|
|
|
|
|
2010-04-02 20:41:21 -06:00
|
|
|
IF(UNIX)
|
|
|
|
SET(CURSES_NEED_WIDE "YES")
|
2010-04-26 16:12:22 -06:00
|
|
|
SET(CURSES_NEED_NCURSES "NO")
|
|
|
|
find_package(Curses QUIET)
|
2010-04-02 20:41:21 -06:00
|
|
|
|
|
|
|
IF(CURSES_FOUND)
|
|
|
|
if(CURSES_HAVE_NCURSESW_NCURSES_H)
|
|
|
|
SET(NCURSES_H "ncursesw/ncurses.h")
|
|
|
|
elseif(CURSES_HAVE_NCURSESW_CURSES_H)
|
|
|
|
SET(NCURSES_H "ncursesw/curses.h")
|
|
|
|
elseif(CURSES_HAVE_NCURSESW_H)
|
|
|
|
SET(NCURSES_H "ncursesw.h")
|
|
|
|
elseif(CURSES_HAVE_CURSESW_H)
|
|
|
|
SET(NCURSES_H "cursesw.h")
|
|
|
|
endif(CURSES_HAVE_NCURSESW_NCURSES_H)
|
|
|
|
IF(NCURSES_H)
|
|
|
|
# OPTION( VARIABLE "Description" Initial state)
|
|
|
|
#OPTION( WITH_FOO "Enable FOO support" ON )
|
|
|
|
#OPTION( WITH_BAR "Enable BAR component" OFF )
|
|
|
|
#SET( BAZ 18 )
|
|
|
|
CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/fake-curses.h.cmake ${CMAKE_CURRENT_SOURCE_DIR}/fake-curses.h )
|
|
|
|
|
|
|
|
# veinlook - look at the map... sort of
|
|
|
|
ADD_EXECUTABLE(dfveinlook veinlook.cpp)
|
|
|
|
INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIR})
|
|
|
|
TARGET_LINK_LIBRARIES(dfveinlook dfhack ${CURSES_LIBRARIES})
|
|
|
|
install(TARGETS
|
|
|
|
dfveinlook
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
)
|
|
|
|
ENDIF(NCURSES_H)
|
|
|
|
ELSE(CURSES_FOUND)
|
2010-04-26 16:12:22 -06:00
|
|
|
MESSAGE(STATUS "Wide-character ncurses library not found - veinlook can't be built")
|
2010-04-02 20:41:21 -06:00
|
|
|
ENDIF(CURSES_FOUND)
|
|
|
|
ENDIF(UNIX)
|
2010-02-17 09:49:19 -07:00
|
|
|
|
2010-03-26 05:20:30 -06:00
|
|
|
# renamer - change the custom names and professions of creatures, sends keys to
|
|
|
|
# df directly
|
|
|
|
# Author: belal
|
2010-04-02 19:52:46 -06:00
|
|
|
#ADD_EXECUTABLE(dfrenamer renamer.cpp)
|
|
|
|
#TARGET_LINK_LIBRARIES(dfrenamer dfhack)
|
2010-02-15 23:21:38 -07:00
|
|
|
|
|
|
|
IF(UNIX)
|
|
|
|
install(TARGETS
|
|
|
|
dfattachtest
|
2010-04-02 19:52:46 -06:00
|
|
|
#dfexpbench
|
|
|
|
#dfcreaturedump
|
|
|
|
#dfbuildingsdump
|
2010-02-15 23:21:38 -07:00
|
|
|
dfmaterialtest
|
|
|
|
dfposition
|
|
|
|
dfsuspend
|
2010-04-02 19:52:46 -06:00
|
|
|
#dfitemdump
|
|
|
|
#dfhotkeynotedump
|
2010-03-26 05:20:30 -06:00
|
|
|
#dffindnameindexes
|
2010-04-02 19:52:46 -06:00
|
|
|
#dfsettlementdump
|
|
|
|
#dfrenamer
|
|
|
|
dfvecc
|
|
|
|
#dfcatsplosion
|
2010-02-15 23:21:38 -07:00
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
)
|
2010-04-29 09:00:34 -06:00
|
|
|
ENDIF(UNIX)
|