Navigation


Changeset 1355:70b6067f4552 in freeDiameter


Ignore:
Timestamp:
May 18, 2019, 6:06:01 PM (5 years ago)
Author:
Thomas Klausner <tk@giga.or.at>
Branch:
default
Phase:
public
Message:

Add tool to generate dict_json_dict_schema.cc from dict_json_dict_schema.json.

Location:
extensions/dict_json
Files:
1 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/dict_json/CMakeLists.txt

    r1333 r1355  
    77PKG_CHECK_MODULES(JSONCPP REQUIRED jsoncpp)
    88PKG_CHECK_MODULES(JSON_SCHEMA REQUIRED json-schema)
     9PKG_CHECK_MODULES(PCRECPP REQUIRED libpcrecpp)
    910
    1011# List of source files
    1112SET(DICT_JSON_SRC
    1213        dict_json.cc
    13         dict_json_dict_schema.cc
     14        ${CMAKE_CURRENT_BINARY_DIR}/dict_json_dict_schema.cc
    1415)
    1516
     
    2930TARGET_LINK_LIBRARIES(dict-json-diff ${JSONCPP_LIBRARIES} ${JSON_SCHEMA_STATIC_LIBRARIES})
    3031
     32ADD_EXECUTABLE(json-schema-to-c json-schema-to-c.cc)
     33TARGET_LINK_LIBRARIES(json-schema-to-c ${JSONCPP_LIBRARIES} ${JSON_SCHEMA_STATIC_LIBRARIES} ${PCRECPP_LIBRARIES})
     34
     35ADD_CUSTOM_COMMAND(
     36        OUTPUT dict_json_dict_schema.cc
     37        COMMAND json-schema-to-c ${CMAKE_CURRENT_SOURCE_DIR}/dict_json_dict_schema.json ${CMAKE_CURRENT_BINARY_DIR}/dict_json_dict_schema.cc
     38        DEPENDS dict_json_dict_schema.json
     39)
    3140
    3241####
     
    3948        RUNTIME DESTINATION ${INSTALL_DAEMON_SUFFIX}
    4049        COMPONENT freeDiameter-dictionary-json)
    41 
    42 # dict_json_dict_schema.cc is created from dict_json_dict_schema.json
    43 # the tool for that is not yet open source, but the conversion is straightforward
Note: See TracChangeset for help on using the changeset viewer.