- Since somewhere in the 0.7 development cycle qpid types were split out
into its own namespace. Here we link against that.
---
src/CMakeLists.txt | 44 ++++++++++++++++++++++++++++----------------
1 files changed, 28 insertions(+), 16 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 73a52f3..e2b0ea9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -30,12 +30,22 @@ set(HOST_LIBRARY
host.cpp
processor.cpp)
-set(HOST_SCHEMA_SOURCES
- ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/host/Package.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/host/Host.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/host/EventHeartbeat.cpp)
-
-add_executable(${M_HOST} ${HOST_SOURCES} ${HOST_LIBRARY} ${HOST_SCHEMA_SOURCES})
+set(SCHEMA_SOURCES
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/ArgsNetworkList.h
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/ArgsNetworkDestroy.h
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/ArgsNetworkStart.h
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/ArgsNetworkStop.h
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/ArgsNetworkStatus.h
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/ArgsNetworkDescribe.h
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/Package.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/Package.h
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/Host.h
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/Host.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/EventHeartbeat.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/Network.h
+ ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/Network.cpp)
+
+add_executable(${M_HOST} ${HOST_SOURCES} ${HOST_LIBRARY} ${SCHEMA_SOURCES})
## Network
set(NET_SOURCES
@@ -43,11 +53,7 @@ set(NET_SOURCES
matahari-net.cpp
qmf/netagent.cpp)
-set(NET_SCHEMA_SOURCES
- ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/net/Package.cpp
- ${CMAKE_CURRENT_BINARY_DIR}/qmf/com/redhat/matahari/net/Network.cpp)
-
-add_executable(${M_NET} ${NET_SOURCES} ${NET_SCHEMA_SOURCES})
+add_executable(${M_NET} ${NET_SOURCES} ${SCHEMA_SOURCES})
# Configure checks
## Includes
@@ -119,6 +125,7 @@ if(MSVC)
find_library(QMFCONSOLE qmfconsole.lib "${QPID_PATH}")
find_library(QPIDCLIENT qpidclient.lib "${QPID_PATH}")
find_library(QPIDCOMMON qpidcommon.lib "${QPID_PATH}")
+ find_library(QPIDCOMMON qpidtypes.lib "${QPID_PATH}")
# Figure out some way to do this automatically on windows
# Perhaps with the strings command
@@ -128,6 +135,7 @@ else(MSVC)
find_library(QMF qmf)
find_library(QPIDCLIENT qpidclient)
find_library(QPIDCOMMON qpidcommon)
+ find_library(QPIDTYPES qpidtypes)
# Figure out the qpid version
if(WIN32)
@@ -161,6 +169,10 @@ if(NOT QPIDCOMMON)
message(FATAL_ERROR "QPIDCOMMON library not found.")
endif(NOT QPIDCOMMON)
+if(NOT QPIDTYPES)
+ message(FATAL_ERROR "QPIDTYPES library not found.")
+endif(NOT QPIDTYPES)
+
find_program(QMFGEN qmf-gen)
if(QMFGEN-NOTFOUND)
message(FATAL_ERROR Missing QMF schema processor.)
@@ -174,7 +186,7 @@ add_definitions(-DQPID_VERSION=${QPID_VERSION})
set(regen_schema OFF)
message(STATUS "Regenerating QMF schemas: ${SCHEMAS}")
foreach (schema_file ${SCHEMAS} ${QMFGEN})
- foreach (file ${HOST_SCHEMA_SOURCES} ${NET_SCHEMA_SOURCES})
+ foreach (file ${SCHEMA_SOURCES})
if (EXISTS ${file})
if (${schema_file} IS_NEWER_THAN ${file})
set(regen_schema ON)
@@ -183,12 +195,12 @@ foreach (schema_file ${SCHEMAS} ${QMFGEN})
else (EXISTS ${file})
set(regen_schema ON)
endif (EXISTS ${file})
- endforeach (file ${HOST_SCHEMA_SOURCES} ${NET_SCHEMA_SOURCES})
+ endforeach (file ${SCHEMA_SOURCES})
endforeach (schema_file ${SCHEMAS})
if (regen_schema)
# Regenerate everything
- execute_process(COMMAND rm -f ${HOST_SCHEMA_SOURCES})
+ execute_process(COMMAND rm -f ${SCHEMA_SOURCES})
execute_process(COMMAND ${QMFGEN} -o ./qmf ${SCHEMAS}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
else (regen_schema)
@@ -196,8 +208,8 @@ else (regen_schema)
endif (regen_schema)
# Add QF libraries
-target_link_libraries(${M_HOST} ${QPIDCOMMON} ${QPIDCLIENT} ${QMF})
-target_link_libraries(${M_NET} ${QPIDCOMMON} ${QPIDCLIENT} ${QMF})
+target_link_libraries(${M_HOST} ${QPIDCOMMON} ${QPIDCLIENT} ${QPIDTYPES} ${QMF})
+target_link_libraries(${M_NET} ${QPIDCOMMON} ${QPIDCLIENT} ${QPIDTYPES} ${QMF})
# Install targets
install(TARGETS ${M_HOST} DESTINATION sbin)
--
1.7.2.3