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
|
2011-08-14 00:42:21 -06:00
|
|
|
IF(UNIX)
|
|
|
|
OPTION(BUILD_DFUSION "Build DFusion." OFF)
|
|
|
|
ELSE()
|
|
|
|
OPTION(BUILD_DFUSION "Build DFusion." ON)
|
|
|
|
ENDIF()
|
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
|
|
|
|
|
|
|
OPTION(BUILD_QTPLUG "Build the experimental Qt plugin." OFF)
|
|
|
|
if(BUILD_QTPLUG)
|
2011-07-16 07:34:29 -06:00
|
|
|
add_subdirectory (qtplug)
|
2011-07-16 10:10:08 -06:00
|
|
|
endif()
|
2011-06-19 20:29:38 -06:00
|
|
|
|
2011-07-21 03:29:26 -06:00
|
|
|
OPTION(BUILD_STONESENSE "Build stonesense (needs a checkout first)." OFF)
|
|
|
|
if(BUILD_STONESENSE)
|
|
|
|
add_subdirectory (stonesense)
|
|
|
|
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
|
|
|
|
2011-11-25 14:14:36 -07:00
|
|
|
OPTION(BUILD_SERVER "Build server." OFF)
|
|
|
|
if(BUILD_SERVER)
|
|
|
|
add_subdirectory (server)
|
|
|
|
endif()
|
|
|
|
|
2011-12-24 03:51:58 -07:00
|
|
|
OPTION(BUILD_DF2MC "Build DF2MC (needs a checkout first)." OFF)
|
2011-11-04 19:22:15 -06:00
|
|
|
if(BUILD_DF2MC)
|
|
|
|
add_subdirectory (df2mc)
|
|
|
|
endif()
|
|
|
|
|
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-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}
|
|
|
|
)
|
|
|
|
|
|
|
|
# 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)
|
|
|
|
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(vdig vdig.cpp)
|
|
|
|
DFHACK_PLUGIN(colonies colonies.cpp)
|
|
|
|
DFHACK_PLUGIN(mode mode.cpp)
|
|
|
|
DFHACK_PLUGIN(liquids liquids.cpp)
|
|
|
|
DFHACK_PLUGIN(tiletypes tiletypes.cpp)
|
|
|
|
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-03-15 03:01:23 -06:00
|
|
|
DFHACK_PLUGIN(rename rename.cpp PROTOBUFS rename)
|
2012-02-21 10:19:17 -07:00
|
|
|
DFHACK_PLUGIN(jobutils jobutils.cpp)
|
|
|
|
DFHACK_PLUGIN(workflow workflow.cpp)
|
|
|
|
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-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)
|
|
|
|
# not yet. busy with other crud again...
|
2012-02-21 10:19:17 -07:00
|
|
|
#DFHACK_PLUGIN(versionosd versionosd.cpp)
|
|
|
|
endif()
|
|
|
|
|
2011-08-22 07:21:13 -06: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()
|
2012-03-20 02:36:36 -06:00
|
|
|
|
2012-03-22 09:30:15 -06:00
|
|
|
# this is a plugin which helps detect cursed creatures (vampires, necromancers, werebeasts, ...)
|
|
|
|
OPTION(BUILD_CURSECHECK "Build the cursecheck plugin." ON)
|
|
|
|
if(BUILD_CURSECHECK)
|
|
|
|
add_subdirectory(cursecheck)
|
2012-03-20 02:36:36 -06:00
|
|
|
endif()
|
2012-03-21 05:40:07 -06:00
|
|
|
|
|
|
|
# alternative version of liquids which can be used non-interactively after configuring it
|
|
|
|
OPTION(BUILD_LIQUIDSGO "Build the liquidsgo plugin." ON)
|
|
|
|
if(BUILD_LIQUIDSGO)
|
|
|
|
add_subdirectory(liquidsgo)
|
|
|
|
endif()
|