2011-11-25 14:14:36 -07:00
|
|
|
PROJECT (server)
|
|
|
|
SET(PROJECT_SRCS
|
|
|
|
main.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
include_directories( ${CMAKE_SOURCE_DIR} )
|
|
|
|
IF(UNIX)
|
|
|
|
OPTION(SERVER_INTERNAL_SO "Link with prebuilt internal zeromq lib and headers." ON)
|
|
|
|
IF(SERVER_INTERNAL_SO)
|
|
|
|
SET(PROJECT_LIBS
|
|
|
|
${server_SOURCE_DIR}/zeromq/libzmq.so.1
|
|
|
|
${PROJECT_LIBS}
|
|
|
|
)
|
|
|
|
include_directories (
|
|
|
|
${include_directories}
|
|
|
|
${server_SOURCE_DIR}/zeromq
|
|
|
|
)
|
2012-03-15 01:07:43 -06:00
|
|
|
install(PROGRAMS ${server_SOURCE_DIR}/zeromq/libzmq.so.1 DESTINATION ${DFHACK_LIBRARY_DESTINATION})
|
2011-11-25 14:14:36 -07:00
|
|
|
ELSE()
|
|
|
|
SET(PROJECT_LIBS
|
|
|
|
zmq
|
|
|
|
${PROJECT_LIBS}
|
|
|
|
)
|
|
|
|
ENDIF()
|
|
|
|
ELSE()
|
2011-11-25 15:21:31 -07:00
|
|
|
SET(PROJECT_LIBS
|
|
|
|
${server_SOURCE_DIR}/zeromq/libzmq.lib
|
|
|
|
${PROJECT_LIBS}
|
|
|
|
)
|
|
|
|
include_directories (
|
|
|
|
${include_directories}
|
|
|
|
${server_SOURCE_DIR}/zeromq
|
|
|
|
)
|
2012-03-15 01:07:43 -06:00
|
|
|
install(PROGRAMS ${server_SOURCE_DIR}/zeromq/libzmq.dll DESTINATION ${DFHACK_LIBRARY_DESTINATION})
|
2011-11-25 15:21:31 -07:00
|
|
|
|
2011-11-25 14:14:36 -07:00
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
DFHACK_PLUGIN(server ${PROJECT_SRCS} LINK_LIBRARIES ${PROJECT_LIBS})
|
|
|
|
|
|
|
|
add_executable ( helloclient hello.cpp )
|
2011-11-25 15:21:31 -07:00
|
|
|
target_link_libraries ( helloclient ${PROJECT_LIBS})
|
2011-11-25 14:14:36 -07:00
|
|
|
install(TARGETS helloclient RUNTIME DESTINATION . )
|