Browse Source

do not compile nodeset example with amalagamation files, force logo copy for html docs

Stasik0 9 years ago
parent
commit
08bf59dba6
2 changed files with 18 additions and 16 deletions
  1. 1 0
      CMakeLists.txt
  2. 17 16
      examples/CMakeLists.txt

+ 1 - 0
CMakeLists.txt

@@ -401,6 +401,7 @@ if(BUILD_DOCUMENTATION)
     add_custom_target(doc ${SPHINX_EXECUTABLE}
       -b html -c "${PROJECT_BINARY_DIR}"
       "${PROJECT_SOURCE_DIR}/doc" "${PROJECT_BINARY_DIR}/doc/sphinx"
+      COMMAND ${CMAKE_COMMAND} -E copy "${PROJECT_SOURCE_DIR}/doc/open62541_html.png" "${PROJECT_BINARY_DIR}/doc/sphinx/_static/"
       DEPENDS doxygen
       COMMENT "Building HTML documentation with Sphinx")
 endif()

+ 17 - 16
examples/CMakeLists.txt

@@ -26,25 +26,26 @@ target_link_libraries(server_firstSteps ${LIBS})
 add_executable(client_firstSteps client_firstSteps.c)
 target_link_libraries(client_firstSteps ${LIBS})
 
-
 add_executable(server_repeated_job server_repeated_job.c)
 target_link_libraries(server_repeated_job ${LIBS})
 
-add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src_generated/nodeset.h ${PROJECT_BINARY_DIR}/src_generated/nodeset.c
-               PRE_BUILD
-               COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/generate_open62541CCode.py -i ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/NodeID_Blacklist_FullNS0.txt ${PROJECT_SOURCE_DIR}/tools/schema/namespace0/Opc.Ua.NodeSet2.xml ${PROJECT_SOURCE_DIR}/examples/server_nodeset.xml ${PROJECT_BINARY_DIR}/src_generated/nodeset
-               DEPENDS ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/generate_open62541CCode.py
-                       ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/logger.py
-                       ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/open62541_MacroHelper.py
-                       ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_builtin_types.py
-                       ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_constants.py
-                       ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_namespace.py
-                       ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_node_types.py
-                       ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/NodeID_Blacklist_FullNS0.txt
-                       ${PROJECT_SOURCE_DIR}/examples/server_nodeset.xml)
-               
-add_executable(server_nodeset server_nodeset.c ${PROJECT_BINARY_DIR}/src_generated/nodeset.c)
-target_link_libraries(server_nodeset ${LIBS})
+if(NOT ENABLE_AMALGAMATION)
+	add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/src_generated/nodeset.h ${PROJECT_BINARY_DIR}/src_generated/nodeset.c
+		           PRE_BUILD
+		           COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/generate_open62541CCode.py -i ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/NodeID_Blacklist_FullNS0.txt ${PROJECT_SOURCE_DIR}/tools/schema/namespace0/Opc.Ua.NodeSet2.xml ${PROJECT_SOURCE_DIR}/examples/server_nodeset.xml ${PROJECT_BINARY_DIR}/src_generated/nodeset
+		           DEPENDS ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/generate_open62541CCode.py
+		                   ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/logger.py
+		                   ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/open62541_MacroHelper.py
+		                   ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_builtin_types.py
+		                   ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_constants.py
+		                   ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_namespace.py
+		                   ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/ua_node_types.py
+		                   ${PROJECT_SOURCE_DIR}/tools/pyUANamespace/NodeID_Blacklist_FullNS0.txt
+		                   ${PROJECT_SOURCE_DIR}/examples/server_nodeset.xml)
+		           
+	add_executable(server_nodeset server_nodeset.c ${PROJECT_BINARY_DIR}/src_generated/nodeset.c)
+	target_link_libraries(server_nodeset ${LIBS})
+endif()
 
 if(ENABLE_METHODCALLS)
   add_executable(server_method server_method.c)