Skip to content

Commit

Permalink
Sync isoworld, some protobuf building changes
Browse files Browse the repository at this point in the history
  • Loading branch information
peterix committed Apr 2, 2013
1 parent c361ba7 commit 3580409
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions plugins/CMakeLists.txt
Expand Up @@ -66,6 +66,7 @@ ADD_CUSTOM_COMMAND(
${PROJECT_PROTOS}
DEPENDS protoc-bin ${PROJECT_PROTOS}
)
add_custom_target(generate_proto DEPENDS ${PROJECT_PROTO_SRCS} ${PROJECT_PROTO_HDRS})

SET_SOURCE_FILES_PROPERTIES( Brushes.h PROPERTIES HEADER_FILE_ONLY TRUE )

Expand Down
12 changes: 10 additions & 2 deletions plugins/Plugins.cmake
Expand Up @@ -65,14 +65,22 @@ MACRO(DFHACK_PLUGIN)
)
CAR(PLUGIN_NAME ${PLUGIN_DEFAULT_ARGS})
CDR(PLUGIN_SOURCES ${PLUGIN_DEFAULT_ARGS})


SET(PLUGIN_PROTOCPP)
FOREACH(pbuf ${PLUGIN_PROTOBUFS})
SET(PLUGIN_SOURCES ${PLUGIN_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/proto/${pbuf}.pb.cc)
SET(PLUGIN_PROTOCPP ${PLUGIN_PROTOCPP} ${CMAKE_CURRENT_SOURCE_DIR}/proto/${pbuf}.pb.cc)
ENDFOREACH()

# Tell CMake the source won't be available until build time.
SET_SOURCE_FILES_PROPERTIES(${PLUGIN_PROTOCPP} PROPERTIES GENERATED 1)

ADD_LIBRARY(${PLUGIN_NAME} MODULE ${PLUGIN_SOURCES})
IDE_FOLDER(${PLUGIN_NAME} "Plugins")


# Make sure the source is generated before the executable builds.
ADD_DEPENDENCIES(${PLUGIN_NAME} generate_proto)

LIST(LENGTH PLUGIN_PROTOBUFS NUM_PROTO)
IF(NUM_PROTO)
TARGET_LINK_LIBRARIES(${PLUGIN_NAME} dfhack protobuf-lite ${PLUGIN_LINK_LIBRARIES})
Expand Down
2 changes: 1 addition & 1 deletion plugins/isoworld
Submodule isoworld updated from 889e95 to 2a409f

0 comments on commit 3580409

Please sign in to comment.