Commit ae7bb9bd authored by Nacho (Ignacio) Solis's avatar Nacho (Ignacio) Solis

Improve Xcode generation

BugzId: 3948
parent 4d632640
......@@ -5,6 +5,8 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
if( UNIX )
link_libraries(m)
endif( UNIX )
......@@ -55,6 +57,7 @@ macro(AddTest testFile)
target_link_libraries(${ARGV0} ${CCNX_COMMON_LIBRARIES})
target_link_libraries(${ARGV0} ${LIBPARC_LIBRARIES})
add_test(${ARGV0} ${ARGV0})
set_target_properties(${ARGV0} PROPERTIES FOLDER Test)
endmacro(AddTest)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
......
......@@ -58,8 +58,12 @@ set(CCNX_API_CONTROL_SOURCE_FILES
)
add_library(ccnx_api_control STATIC ${CCNX_API_CONTROL_SOURCE_FILES})
add_library(ccnx_api_control STATIC ${CCNX_API_CONTROL_SOURCE_FILES} ${CCNX_API_CONTROL_HEADERS})
add_library(ccnx_api_control.shared SHARED ${CCNX_API_CONTROL_SOURCE_FILES})
source_group(Sources FILES ${CCNX_API_CONTROL_SOURCE_FILES})
source_group(Sources FILES ${CCNX_API_CONTROL_HEADERS})
set_target_properties(ccnx_api_control.shared PROPERTIES
C_STANDARD 99
SOVERSION 1
......
......@@ -12,8 +12,12 @@ set(CCNX_API_NOTIFY_SOURCE_FILES
)
add_library(ccnx_api_notify STATIC ${CCNX_API_NOTIFY_SOURCE_FILES})
add_library(ccnx_api_notify STATIC ${CCNX_API_NOTIFY_SOURCE_FILES} ${CCNX_API_NOTIFY_HEADERS})
add_library(ccnx_api_notify.shared SHARED ${CCNX_API_NOTIFY_SOURCE_FILES})
source_group(Sources FILES ${CCNX_API_NOTIFY_SOURCE_FILES})
source_group(Sources FILES ${CCNX_API_NOTIFY_HEADERS})
set_target_properties(ccnx_api_notify.shared PROPERTIES
C_STANDARD 99
SOVERSION 1
......
set(TRANSPORT_BASE_HDRS
set(BASE_HDRS
librta_About.h
)
set(TRANSPORT_COMMON_HDRS
set(COMMON_HDRS
common/transport.h
common/ccnx_TransportConfig.h
common/transport_Message.h
......@@ -11,16 +11,36 @@ set(TRANSPORT_COMMON_HDRS
common/ccnx_ConnectionConfig.h
)
set(TRANSPORT_TEST_TOOLS_HDRS
test_tools/bent_pipe.h
test_tools/traffic_tools.h
)
source_group(common FILES ${COMMON_HDRS})
set(TRANSPORT_RTA_HDRS
set(RTA_CORE_HDRS
transport_rta/rta_Transport.h
transport_rta/core/components.h
transport_rta/core/rta.h
transport_rta/core/rta_ComponentQueue.h
transport_rta/core/rta_ComponentStats.h
transport_rta/core/rta_Connection.h
transport_rta/core/rta_ConnectionTable.h
transport_rta/core/rta_Framework.h
transport_rta/core/rta_Framework_Commands.h
transport_rta/core/rta_Framework_NonThreaded.h
transport_rta/core/rta_Framework_Services.h
transport_rta/core/rta_Framework_Threaded.h
transport_rta/core/rta_Framework_private.h
transport_rta/core/rta_Logger.h
transport_rta/core/rta_ProtocolStack.h
test_tools/bent_pipe.h
test_tools/traffic_tools.h
)
set(TRANSPORT_RTA_COMMANDS_HDRS
source_group(core FILES ${RTA_CORE_HDRS})
set(TEST_TOOLS_HDRS
test_tools/bent_pipe.h
test_tools/traffic_tools.h
)
set(RTA_COMMANDS_HDRS
transport_rta/commands/rta_CommandCloseConnection.h
transport_rta/commands/rta_CommandCreateProtocolStack.h
transport_rta/commands/rta_CommandDestroyProtocolStack.h
......@@ -29,7 +49,9 @@ set(TRANSPORT_RTA_COMMANDS_HDRS
transport_rta/commands/rta_CommandTransmitStatistics.h
)
set(TRANSPORT_RTA_CONFIG_HDRS
source_group(rta_commands FILES ${RTA_COMMANDS_HDRS})
set(RTA_CONFIG_HDRS
transport_rta/config/config_ApiConnector.h
transport_rta/config/config_Codec_Tlv.h
transport_rta/config/config_CryptoCache.h
......@@ -44,6 +66,26 @@ set(TRANSPORT_RTA_CONFIG_HDRS
transport_rta/config/config_TestingComponent.h
)
source_group(rta_config FILES ${RTA_CONFIG_HDRS})
set(RTA_CONNECTORS_HDRS
transport_rta/connectors/connector_Api.h
transport_rta/connectors/rta_ApiConnection.h
transport_rta/connectors/connector_Forwarder.h
)
source_group(rta_connectors FILES ${RTA_CONNECTORS_HDRS})
set(RTA_COMPONENTS_HDRS
transport_rta/components/Flowcontrol_Vegas/vegas_private.h
transport_rta/components/codec_Signing.h
transport_rta/components/component_Codec.h
transport_rta/components/component_Flowcontrol.h
transport_rta/components/component_Testing.h
)
source_group(rta_components FILES ${RTA_COMPONENTS_HDRS})
set(COMMON_SRCS
librta_About.c
common/transport.c
......@@ -52,7 +94,9 @@ set(COMMON_SRCS
common/transport_MetaMessage.c
common/ccnx_StackConfig.c
common/ccnx_ConnectionConfig.c
)
)
source_group(common FILES ${COMMON_SRCS})
set(RTA_CORE_SRCS
transport_rta/core/rta_ComponentStats.c
......@@ -71,6 +115,8 @@ set(RTA_CORE_SRCS
test_tools/traffic_tools.c
)
source_group(core FILES ${RTA_CORE_SRCS})
set(RTA_COMMANDS_SRCS
transport_rta/commands/rta_Command.c
transport_rta/commands/rta_CommandCloseConnection.c
......@@ -80,6 +126,7 @@ set(RTA_COMMANDS_SRCS
transport_rta/commands/rta_CommandTransmitStatistics.c
)
source_group(rta_commands FILES ${RTA_COMMANDS_SRCS})
set(RTA_CONFIG_SRCS
transport_rta/config/config_ApiConnector.c
......@@ -95,6 +142,8 @@ set(RTA_CONFIG_SRCS
transport_rta/config/config_SymmetricKeySignerFileStore.c
)
source_group(rta_config FILES ${RTA_CONFIG_SRCS})
set(RTA_CONNECTORS_SRCS
transport_rta/connectors/connector_Api.c
transport_rta/connectors/rta_ApiConnection.c
......@@ -102,6 +151,8 @@ set(RTA_CONNECTORS_SRCS
transport_rta/connectors/connector_Forwarder_Metis.c
)
source_group(rta_connectors FILES ${RTA_CONNECTORS_SRCS})
set(RTA_COMPONENTS_SRCS
transport_rta/components/codec_Signing.c
transport_rta/components/component_Codec_Tlv.c
......@@ -110,23 +161,29 @@ set(RTA_COMPONENTS_SRCS
transport_rta/components/component_Testing.c
)
source_group(rta_components FILES ${RTA_COMPONENTS_SRCS})
set(TRANSPORT_RTA_SOURCE_FILES
${TRANSPORT_BASE_HDRS}
${TRANSPORT_COMMON_HDRS}
${TRANSPORT_TEST_TOOLS_HDRS}
${TRANSPORT_RTA_CONFIG_HDRS}
${TRANSPORT_RTA_HDRS}
${TRANSPORT_RTA_COMMANDS_HDRS}
${BASE_HDRS}
${COMMON_HDRS}
${RTA_CORE_HDRS}
${RTA_CONFIG_HDRS}
${RTA_COMPONENTS_HDRS}
${RTA_CONNECTORS_HDRS}
${RTA_COMMANDS_HDRS}
${TEST_TOOLS_HDRS}
${COMMON_SRCS}
${RTA_CORE_SRCS}
${RTA_CONFIG_SRCS}
${RTA_COMPONENTS_SRCS}
${RTA_CONNECTORS_SRCS}
${RTA_CONFIG_SRCS}
${RTA_COMMANDS_SRCS}
${RTA_CORE_SRCS}
${COMMON_SRCS}
)
add_library(ccnx_transport_rta STATIC ${TRANSPORT_RTA_SOURCE_FILES})
add_library(ccnx_transport_rta.shared SHARED ${TRANSPORT_RTA_SOURCE_FILES})
set_target_properties(ccnx_transport_rta.shared PROPERTIES
C_STANDARD 99
SOVERSION 1
......@@ -144,12 +201,12 @@ foreach(lib ${libccnx_transport_rta_libraries})
set_property(TARGET ${lib} PROPERTY INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endforeach()
install(FILES ${TRANSPORT_BASE_HDRS} DESTINATION include/ccnx/transport )
install(FILES ${TRANSPORT_COMMON_HDRS} DESTINATION include/ccnx/transport/common )
install(FILES ${TRANSPORT_TEST_TOOLS_HDRS} DESTINATION include/ccnx/transport/test_tools )
install(FILES ${TRANSPORT_RTA_HDRS} DESTINATION include/ccnx/transport/transport_rta )
install(FILES ${TRANSPORT_RTA_CONFIG_HDRS} DESTINATION include/ccnx/transport/transport_rta/config )
install(FILES ${TRANSPORT_RTA_COMMANDS_HDRS} DESTINATION include/ccnx/transport/transport_rta/commands )
install(FILES ${BASE_HDRS} DESTINATION include/ccnx/transport )
install(FILES ${COMMON_HDRS} DESTINATION include/ccnx/transport/common )
install(FILES ${TEST_TOOLS_HDRS} DESTINATION include/ccnx/transport/test_tools )
install(FILES ${RTA_CORE_HDRS} DESTINATION include/ccnx/transport/transport_rta )
install(FILES ${RTA_CONFIG_HDRS} DESTINATION include/ccnx/transport/transport_rta/config )
install(FILES ${RTA_COMMANDS_HDRS} DESTINATION include/ccnx/transport/transport_rta/commands )
add_subdirectory(common/test)
add_subdirectory(transport_rta/test)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment