Prechádzať zdrojové kódy

Merge branch 'master' of https://github.com/acplt/open62541

Leon Urbas 10 rokov pred
rodič
commit
b0369ee951
5 zmenil súbory, kde vykonal 17 pridanie a 12 odobranie
  1. 3 2
      .travis.yml
  2. 6 1
      CMakeLists.txt
  3. 7 1
      README.md
  4. 0 8
      tests/.gitignore
  5. 1 0
      tests/check_builtin.c

+ 3 - 2
.travis.yml

@@ -24,9 +24,10 @@ before_install:
    - wget http://security.ubuntu.com/ubuntu/pool/main/c/check/check_0.9.10-6ubuntu3_amd64.deb
    - sudo dpkg -i check_0.9.10-6ubuntu3_amd64.deb
    - sudo pip install cpp-coveralls
-   - export CC=/usr/bin/gcc-4.8
+   - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20
+   - sudo update-alternatives --config gcc
 script: 
-   - mkdir build
+   - mkdir -p build
    - cd build
    - cmake -DGENERATE_DOCUMENTATION=ON .. 
    - echo "Production build"

+ 6 - 1
CMakeLists.txt

@@ -64,6 +64,9 @@ configure_file("src/ua_config.h.in" "${PROJECT_BINARY_DIR}/src_generated/ua_conf
 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src")
 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/src/util")
 
+file(GLOB_RECURSE headers "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h")
+file(GLOB generated_headers "${PROJECT_BINARY_DIR}/src_generated/*.h")
+
 set(lib_sources src/ua_types.c
                 src/ua_types_encoding_binary.c
                 src/ua_application.c
@@ -90,7 +93,9 @@ set(lib_sources src/ua_types.c
                 src/util/ua_indexedList.c
                 src/util/ua_base64.c
                 ${PROJECT_BINARY_DIR}/src_generated/ua_types_generated.c
-                ${PROJECT_BINARY_DIR}/src_generated/ua_namespace_0.c)
+                ${PROJECT_BINARY_DIR}/src_generated/ua_namespace_0.c
+				${headers}
+				${generated_headers})
 
 if(MULTITHREADING)
     list(APPEND lib_sources src/ua_namespace_concurrent.c)

+ 7 - 1
README.md

@@ -91,6 +91,11 @@ open "build\open62541.sln" in Visual Studio 2013 and build as usual
 <path-to>\mingw32-make.exe
 ```
 
+#### Install pkg-config (for CMake)
+* Download http://win32builder.gnome.org/packages/3.6/pkg-config_0.28-1_win32.zip and unpack bin/pkg-config.exe to <MinGW-path>/bin
+* Download http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib_2.28.8-1_win32.zip and unzip bin/libglib-2.0-0.dll to <MinGW-path>/bin
+* Download http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip and unzip bin/intl.dll to <MinGW-path>/bin
+
 #### Get expat
 * Start MinGW Installation Manager ```mingw-get.exe```
 * Choose all Packages, mark mingw32-expat and install
@@ -101,7 +106,8 @@ open "build\open62541.sln" in Visual Studio 2013 and build as usual
 ```bash
 cd check-code
 autoreconf --install
-./configure
+mount c:/<MinGW-path> /mingw
+./configure --prefix=/mingw CC=mingw32-gcc
 make
 make install
 ```

+ 0 - 8
tests/.gitignore

@@ -1,8 +0,0 @@
-/*.trs
-/check_list
-/check_stack
-/check_indexedList
-/check_base64
-/check_services_view
-/check_xml
-			

+ 1 - 0
tests/check_builtin.c

@@ -214,6 +214,7 @@ START_TEST(UA_ExtensionObject_calcSizeShallWorkOnExample) {
 
 	// empty ExtensionObject, handcoded
 	// when
+	UA_ExtensionObject_init(&extensionObject);
 	extensionObject.typeId.nodeIdType = UA_NODEIDTYPE_NUMERIC;
 	extensionObject.typeId.identifier.numeric = 0;
 	extensionObject.encoding = UA_EXTENSIONOBJECT_ENCODINGMASK_NOBODYISENCODED;