2011-09-01 17:25:01 -06:00
|
|
|
INCLUDE(Plugins.cmake)
|
2011-07-25 03:09:29 -06:00
|
|
|
|
2011-08-08 13:17:11 -06:00
|
|
|
# Dfusion plugin
|
2013-03-16 11:37:16 -06:00
|
|
|
OPTION(BUILD_DFUSION "Build DFusion." ON)
|
2011-08-08 13:17:11 -06:00
|
|
|
if(BUILD_DFUSION)
|
2011-07-25 03:09:29 -06:00
|
|
|
add_subdirectory (Dfusion)
|
2011-07-30 14:08:24 -06:00
|
|
|
endif()
|
2011-07-16 10:10:08 -06:00
|
|
|
|
2012-07-08 17:05:40 -06:00
|
|
|
OPTION(BUILD_STONESENSE "Build stonesense (needs a checkout first)." OFF)
|
2011-07-21 03:29:26 -06:00
|
|
|
if(BUILD_STONESENSE)
|
|
|
|
add_subdirectory (stonesense)
|
|
|
|
endif()
|
|
|
|
|
2013-03-30 03:57:37 -06:00
|
|
|
OPTION(BUILD_ISOWORLD "Build isoworld (needs a checkout first)." OFF)
|
|
|
|
if(BUILD_ISOWORLD)
|
2013-04-02 17:10:06 -06:00
|
|
|
add_subdirectory (isoworld)
|
|
|
|
IF(UNIX)
|
|
|
|
if (APPLE)
|
|
|
|
#TODO: add an OSX runner script
|
|
|
|
else()
|
|
|
|
# On linux, copy our version of the df launch script which sets LD_PRELOAD
|
|
|
|
install(PROGRAMS ${dfhack_SOURCE_DIR}/package/linux/runisoworld
|
|
|
|
DESTINATION .)
|
|
|
|
endif()
|
|
|
|
ENDIF()
|
2013-03-30 03:57:37 -06:00
|
|
|
endif()
|
|
|
|
|
2011-08-07 16:55:17 -06:00
|
|
|
OPTION(BUILD_DEV_PLUGINS "Build developer plugins." OFF)
|
|
|
|
if(BUILD_DEV_PLUGINS)
|
|
|
|
add_subdirectory (devel)
|
2011-07-14 00:52:06 -06:00
|
|
|
endif()
|
2011-07-16 10:10:08 -06:00
|
|
|
|
2012-04-14 06:15:46 -06:00
|
|
|
#It's dead :<
|
|
|
|
#OPTION(BUILD_DF2MC "Build DF2MC (needs a checkout first)." OFF)
|
|
|
|
#if(BUILD_DF2MC)
|
|
|
|
# add_subdirectory (df2mc)
|
|
|
|
#endif()
|
2011-11-04 19:22:15 -06:00
|
|
|
|
2012-01-19 23:15:51 -07:00
|
|
|
OPTION(BUILD_MAPEXPORT "Build map exporter." ON)
|
|
|
|
if (BUILD_MAPEXPORT)
|
|
|
|
add_subdirectory (mapexport)
|
|
|
|
endif()
|
|
|
|
|
2012-02-05 12:16:00 -07:00
|
|
|
OPTION(BUILD_DWARFEXPORT "Build dwarf exporter." ON)
|
|
|
|
if (BUILD_DWARFEXPORT)
|
2012-02-05 12:41:12 -07:00
|
|
|
add_subdirectory (dwarfexport)
|
2012-02-05 12:16:00 -07:00
|
|
|
endif()
|
2011-07-21 03:29:26 -06:00
|
|
|
|
2012-07-05 09:39:27 -06:00
|
|
|
OPTION(BUILD_RUBY "Build ruby binding." ON)
|
2012-03-21 11:49:50 -06:00
|
|
|
if (BUILD_RUBY)
|
|
|
|
add_subdirectory (ruby)
|
|
|
|
endif()
|
|
|
|
|
Allow plugins to export functions to lua with safe reload support.
- To ensure reload safety functions have to be wrapped. Every call
checks the loaded state and locks a mutex in Plugin. If the plugin
is unloaded, calling its functions throws a lua error. Therefore,
plugins may not create closures or export yieldable functions.
- The set of function argument and return types supported by
LuaWrapper is severely limited when compared to being compiled
inside the main library.
Currently supported types: numbers, bool, std::string, df::foo,
df::foo*, std::vector<bool>, std::vector<df::foo*>.
- To facilitate postponing initialization until after all plugins
have been loaded, the core sends a SC_CORE_INITIALIZED event.
- As an example, the burrows plugin now exports its functions.
2012-04-14 09:44:07 -06:00
|
|
|
install(DIRECTORY lua/
|
|
|
|
DESTINATION ${DFHACK_LUA_DESTINATION}/plugins
|
|
|
|
FILES_MATCHING PATTERN "*.lua")
|
2012-09-06 07:10:58 -06:00
|
|
|
install(DIRECTORY raw/
|
|
|
|
DESTINATION ${DFHACK_DATA_DESTINATION}/raw
|
|
|
|
FILES_MATCHING PATTERN "*.txt")
|
2012-09-17 11:15:51 -06:00
|
|
|
install(DIRECTORY raw/
|
|
|
|
DESTINATION ${DFHACK_DATA_DESTINATION}/raw
|
|
|
|
FILES_MATCHING PATTERN "*.diff")
|
Allow plugins to export functions to lua with safe reload support.
- To ensure reload safety functions have to be wrapped. Every call
checks the loaded state and locks a mutex in Plugin. If the plugin
is unloaded, calling its functions throws a lua error. Therefore,
plugins may not create closures or export yieldable functions.
- The set of function argument and return types supported by
LuaWrapper is severely limited when compared to being compiled
inside the main library.
Currently supported types: numbers, bool, std::string, df::foo,
df::foo*, std::vector<bool>, std::vector<df::foo*>.
- To facilitate postponing initialization until after all plugins
have been loaded, the core sends a SC_CORE_INITIALIZED event.
- As an example, the burrows plugin now exports its functions.
2012-04-14 09:44:07 -06:00
|
|
|
|
2012-03-15 03:01:23 -06:00
|
|
|
# Protobuf
|
|
|
|
FILE(GLOB PROJECT_PROTOS ${CMAKE_CURRENT_SOURCE_DIR}/proto/*.proto)
|
|
|
|
|
|
|
|
STRING(REPLACE ".proto" ".pb.cc" PROJECT_PROTO_SRCS "${PROJECT_PROTOS}")
|
|
|
|
STRING(REPLACE ".proto" ".pb.h" PROJECT_PROTO_HDRS "${PROJECT_PROTOS}")
|
|
|
|
|
|
|
|
ADD_CUSTOM_COMMAND(
|
|
|
|
OUTPUT ${PROJECT_PROTO_SRCS} ${PROJECT_PROTO_HDRS}
|
2012-03-15 04:06:50 -06:00
|
|
|
COMMAND protoc-bin -I=${dfhack_SOURCE_DIR}/library/proto/
|
|
|
|
-I=${CMAKE_CURRENT_SOURCE_DIR}/proto/
|
2012-03-15 03:01:23 -06:00
|
|
|
--cpp_out=${CMAKE_CURRENT_SOURCE_DIR}/proto/
|
|
|
|
${PROJECT_PROTOS}
|
|
|
|
DEPENDS protoc-bin ${PROJECT_PROTOS}
|
|
|
|
)
|
2013-04-02 14:37:41 -06:00
|
|
|
add_custom_target(generate_proto DEPENDS ${PROJECT_PROTO_SRCS} ${PROJECT_PROTO_HDRS})
|
2012-03-15 03:01:23 -06:00
|
|
|
|
2012-03-24 06:22:43 -06:00
|
|
|
SET_SOURCE_FILES_PROPERTIES( Brushes.h PROPERTIES HEADER_FILE_ONLY TRUE )
|
|
|
|
|
2012-08-23 18:37:43 -06:00
|
|
|
add_subdirectory(diggingInvaders)
|
|
|
|
|
2012-03-15 03:01:23 -06:00
|
|
|
# Plugins
|
2012-02-21 10:19:17 -07:00
|
|
|
OPTION(BUILD_SUPPORTED "Build the supported plugins (reveal, probe, etc.)." ON)
|
|
|
|
if (BUILD_SUPPORTED)
|
|
|
|
DFHACK_PLUGIN(reveal reveal.cpp)
|
|
|
|
DFHACK_PLUGIN(probe probe.cpp)
|
2012-03-23 16:49:28 -06:00
|
|
|
# this is a plugin which helps detect cursed creatures (vampires, necromancers, werebeasts, ...)
|
|
|
|
DFHACK_PLUGIN(cursecheck cursecheck.cpp)
|
2012-03-23 18:29:09 -06:00
|
|
|
# automatically assign labors to dwarves!
|
|
|
|
DFHACK_PLUGIN(autolabor autolabor.cpp)
|
2012-03-31 07:41:55 -06:00
|
|
|
DFHACK_PLUGIN(dig dig.cpp)
|
2012-02-21 10:19:17 -07:00
|
|
|
DFHACK_PLUGIN(drybuckets drybuckets.cpp)
|
|
|
|
DFHACK_PLUGIN(getplants getplants.cpp)
|
|
|
|
DFHACK_PLUGIN(plants plants.cpp)
|
|
|
|
DFHACK_PLUGIN(fastdwarf fastdwarf.cpp)
|
|
|
|
DFHACK_PLUGIN(prospector prospector.cpp)
|
|
|
|
DFHACK_PLUGIN(cleaners cleaners.cpp)
|
|
|
|
DFHACK_PLUGIN(weather weather.cpp)
|
|
|
|
DFHACK_PLUGIN(colonies colonies.cpp)
|
|
|
|
DFHACK_PLUGIN(mode mode.cpp)
|
2012-08-25 10:01:03 -06:00
|
|
|
DFHACK_PLUGIN(liquids liquids.cpp Brushes.h LINK_LIBRARIES lua)
|
2012-03-24 06:22:43 -06:00
|
|
|
DFHACK_PLUGIN(tiletypes tiletypes.cpp Brushes.h)
|
2012-02-21 10:19:17 -07:00
|
|
|
DFHACK_PLUGIN(tubefill tubefill.cpp)
|
|
|
|
DFHACK_PLUGIN(autodump autodump.cpp)
|
|
|
|
DFHACK_PLUGIN(cleanowned cleanowned.cpp)
|
|
|
|
DFHACK_PLUGIN(deramp deramp.cpp)
|
|
|
|
DFHACK_PLUGIN(flows flows.cpp)
|
|
|
|
DFHACK_PLUGIN(filltraffic filltraffic.cpp)
|
|
|
|
DFHACK_PLUGIN(seedwatch seedwatch.cpp)
|
|
|
|
DFHACK_PLUGIN(initflags initflags.cpp)
|
|
|
|
DFHACK_PLUGIN(stockpiles stockpiles.cpp)
|
2012-09-05 11:27:42 -06:00
|
|
|
DFHACK_PLUGIN(rename rename.cpp LINK_LIBRARIES lua PROTOBUFS rename)
|
2012-02-21 10:19:17 -07:00
|
|
|
DFHACK_PLUGIN(jobutils jobutils.cpp)
|
2012-10-24 13:01:31 -06:00
|
|
|
DFHACK_PLUGIN(workflow workflow.cpp LINK_LIBRARIES lua)
|
2013-05-24 12:43:40 -06:00
|
|
|
DFHACK_PLUGIN(stockflow stockflow.cpp LINK_LIBRARIES lua)
|
2012-02-21 10:19:17 -07:00
|
|
|
DFHACK_PLUGIN(showmood showmood.cpp)
|
|
|
|
DFHACK_PLUGIN(fixveins fixveins.cpp)
|
|
|
|
DFHACK_PLUGIN(fixpositions fixpositions.cpp)
|
|
|
|
DFHACK_PLUGIN(follow follow.cpp)
|
2012-02-24 13:07:04 -07:00
|
|
|
DFHACK_PLUGIN(changevein changevein.cpp)
|
2012-03-27 03:28:10 -06:00
|
|
|
DFHACK_PLUGIN(changelayer changelayer.cpp)
|
2012-03-29 07:33:54 -06:00
|
|
|
DFHACK_PLUGIN(changeitem changeitem.cpp)
|
2012-02-25 06:08:05 -07:00
|
|
|
DFHACK_PLUGIN(advtools advtools.cpp)
|
2012-03-05 08:47:06 -07:00
|
|
|
DFHACK_PLUGIN(tweak tweak.cpp)
|
2012-03-10 12:40:55 -07:00
|
|
|
DFHACK_PLUGIN(feature feature.cpp)
|
2012-03-11 15:25:30 -06:00
|
|
|
DFHACK_PLUGIN(lair lair.cpp)
|
2013-03-28 18:48:45 -06:00
|
|
|
DFHACK_PLUGIN(zone zone.cpp LINK_LIBRARIES lua)
|
2012-04-17 20:12:11 -06:00
|
|
|
DFHACK_PLUGIN(catsplosion catsplosion.cpp)
|
|
|
|
DFHACK_PLUGIN(regrass regrass.cpp)
|
2012-05-15 04:03:29 -06:00
|
|
|
DFHACK_PLUGIN(forceequip forceequip.cpp)
|
2012-08-21 14:43:32 -06:00
|
|
|
DFHACK_PLUGIN(manipulator manipulator.cpp)
|
2012-10-19 06:38:28 -06:00
|
|
|
DFHACK_PLUGIN(search search.cpp)
|
2012-11-20 03:12:11 -07:00
|
|
|
DFHACK_PLUGIN(automaterial automaterial.cpp)
|
2012-04-14 17:58:02 -06:00
|
|
|
# this one exports functions to lua
|
|
|
|
DFHACK_PLUGIN(burrows burrows.cpp LINK_LIBRARIES lua)
|
2012-04-21 05:43:52 -06:00
|
|
|
DFHACK_PLUGIN(sort sort.cpp LINK_LIBRARIES lua)
|
2012-09-06 07:10:58 -06:00
|
|
|
DFHACK_PLUGIN(steam-engine steam-engine.cpp)
|
2012-09-06 02:37:29 -06:00
|
|
|
DFHACK_PLUGIN(power-meter power-meter.cpp LINK_LIBRARIES lua)
|
2012-09-17 04:59:59 -06:00
|
|
|
DFHACK_PLUGIN(siege-engine siege-engine.cpp LINK_LIBRARIES lua)
|
2012-11-17 16:52:46 -07:00
|
|
|
DFHACK_PLUGIN(eventful eventful.cpp LINK_LIBRARIES lua)
|
2012-09-17 11:15:51 -06:00
|
|
|
DFHACK_PLUGIN(add-spatter add-spatter.cpp)
|
2012-10-28 12:05:00 -06:00
|
|
|
DFHACK_PLUGIN(fix-armory fix-armory.cpp)
|
2012-03-11 15:25:30 -06:00
|
|
|
# not yet. busy with other crud again...
|
2012-02-21 10:19:17 -07:00
|
|
|
#DFHACK_PLUGIN(versionosd versionosd.cpp)
|
2012-08-23 20:21:09 -06:00
|
|
|
DFHACK_PLUGIN(misery misery.cpp)
|
2012-12-08 10:50:33 -07:00
|
|
|
DFHACK_PLUGIN(workNow workNow.cpp)
|
2012-10-29 21:29:07 -06:00
|
|
|
#DFHACK_PLUGIN(dfstream dfstream.cpp LINK_LIBRARIES clsocket dfhack-tinythread)
|
2013-01-05 11:35:49 -07:00
|
|
|
DFHACK_PLUGIN(autoSyndrome autoSyndrome.cpp)
|
2013-03-16 22:23:08 -06:00
|
|
|
DFHACK_PLUGIN(syndromeTrigger syndromeTrigger.cpp)
|
2013-01-05 14:34:33 -07:00
|
|
|
DFHACK_PLUGIN(infiniteSky infiniteSky.cpp)
|
2013-06-25 17:57:17 -06:00
|
|
|
DFHACK_PLUGIN(digFlood digFlood.cpp)
|
2013-02-27 10:09:06 -07:00
|
|
|
DFHACK_PLUGIN(createitem createitem.cpp)
|
2013-03-23 22:15:20 -06:00
|
|
|
DFHACK_PLUGIN(outsideOnly outsideOnly.cpp)
|
2013-04-24 09:24:03 -06:00
|
|
|
DFHACK_PLUGIN(isoworldremote isoworldremote.cpp PROTOBUFS isoworldremote)
|
2013-01-07 01:17:38 -07:00
|
|
|
DFHACK_PLUGIN(buildingplan buildingplan.cpp)
|
2013-01-30 01:49:46 -07:00
|
|
|
DFHACK_PLUGIN(resume resume.cpp)
|
2013-02-15 16:10:47 -07:00
|
|
|
DFHACK_PLUGIN(dwarfmonitor dwarfmonitor.cpp)
|
2013-03-16 01:35:53 -06:00
|
|
|
DFHACK_PLUGIN(mousequery mousequery.cpp)
|
2013-03-25 04:47:05 -06:00
|
|
|
DFHACK_PLUGIN(autotrade autotrade.cpp)
|
2013-04-05 22:40:07 -06:00
|
|
|
DFHACK_PLUGIN(stocks stocks.cpp)
|
2013-05-30 20:18:08 -06:00
|
|
|
DFHACK_PLUGIN(treefarm treefarm.cpp)
|
2013-06-14 13:40:02 -06:00
|
|
|
DFHACK_PLUGIN(cleanconst cleanconst.cpp)
|
2013-10-09 23:53:36 -06:00
|
|
|
DFHACK_PLUGIN(3dveins 3dveins.cpp)
|
2014-01-18 21:45:42 -07:00
|
|
|
DFHACK_PLUGIN(strangemood strangemood.cpp)
|
2014-03-04 10:00:12 -07:00
|
|
|
DFHACK_PLUGIN(command-prompt command-prompt.cpp)
|
2014-06-14 22:40:12 -06:00
|
|
|
DFHACK_PLUGIN(remotefortressreader remotefortressreader.cpp PROTOBUFS RemoteFortressReader)
|
2014-05-04 09:52:01 -06:00
|
|
|
DFHACK_PLUGIN(building-hacks building-hacks.cpp LINK_LIBRARIES lua)
|
2014-05-18 09:51:49 -06:00
|
|
|
DFHACK_PLUGIN(embark-tools embark-tools.cpp)
|
2014-05-17 15:59:41 -06:00
|
|
|
DFHACK_PLUGIN(petcapRemover petcapRemover.cpp)
|
2014-06-27 01:22:06 -06:00
|
|
|
|
|
|
|
add_subdirectory(rendermax)
|
2014-03-04 10:00:12 -07:00
|
|
|
endif()
|
2012-02-21 10:19:17 -07:00
|
|
|
|
2011-10-06 19:53:58 -06:00
|
|
|
# this is the skeleton plugin. If you want to make your own, make a copy and then change it
|
|
|
|
OPTION(BUILD_SKELETON "Build the skeleton plugin." OFF)
|
|
|
|
if(BUILD_SKELETON)
|
|
|
|
add_subdirectory(skeleton)
|
|
|
|
endif()
|