Skip to content

Commit

Permalink
Revert "Merge pull request #102 from mariokonrad/upstream-tinyxml"
Browse files Browse the repository at this point in the history
This reverts commit 27b4d4c, reversing
changes made to 3381e7a.
  • Loading branch information
David Register committed Mar 5, 2014
1 parent 906e82f commit b1f1630
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 530 deletions.
22 changes: 10 additions & 12 deletions CMakeLists.txt
Expand Up @@ -31,16 +31,14 @@
# set /MT for Release build, and /MTd for debug.

# define minimum cmake version
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6.2)
# This should be 2.8.0 to have FindGTK2 module
IF (COMMAND cmake_policy)
CMAKE_POLICY(SET CMP0003 OLD)
CMAKE_POLICY(SET CMP0005 OLD)
CMAKE_POLICY(SET CMP0011 OLD)
ENDIF (COMMAND cmake_policy)

INCLUDE(ExternalProject)

PROJECT(OpenCPN)

#SET(CMAKE_VERBOSE_MAKEFILE ON)
Expand Down Expand Up @@ -529,6 +527,13 @@ ENDIF(wx_Version MATCHES "2.9")

SET( PACKAGE_HEADERS "" )

SET(SRC_TINYXML
src/tinyxml.cpp
src/tinyxmlerror.cpp
src/tinyxmlparser.cpp
include/tinyxml.h
)

IF(OPENGL_GLU_FOUND)
SET(HDRS ${HDRS} include/glChartCanvas.h
include/glTextureDescriptor.h
Expand All @@ -545,9 +550,8 @@ IF(TINYXML_FOUND)
ADD_DEFINITIONS(-DTIXML_USE_STL)
ELSE(TINYXML_FOUND)
message (STATUS "tinyxml library not found")
INCLUDE(ExternTinyXML)
SET(EXTRA_LIBS ${EXTRA_LIBS} tinyxml)
INCLUDE_DIRECTORIES("${tinyxml_INCLUDE_DIR}/tinyxml")
SET(SRCS ${SRCS} ${SRC_TINYXML})
ADD_DEFINITIONS(-DTIXML_USE_STL)
ENDIF(TINYXML_FOUND)


Expand Down Expand Up @@ -636,9 +640,6 @@ IF (USE_S57)
src/mygdal/gdal_misc.cpp
)
ADD_LIBRARY(S57ENC ${SRC_S57ENC})
IF(NOT TINYXML_FOUND)
ADD_DEPENDENCIES(S57ENC tinyxml)
ENDIF()
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/mygdal)
SET(EXTRA_LIBS ${EXTRA_LIBS} S57ENC)
ELSE (USE_S57)
Expand Down Expand Up @@ -697,9 +698,6 @@ IF (USE_GARMINHOST)
ENDIF(WIN32)

ADD_LIBRARY(GARMINHOST ${SRC_GARMINHOST})
IF(NOT TINYXML_FOUND)
ADD_DEPENDENCIES(GARMINHOST tinyxml)
ENDIF(NOT TINYXML_FOUND)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src/garmin/jeeps)
SET(EXTRA_LIBS ${EXTRA_LIBS} GARMINHOST)
IF(WIN32)
Expand Down
34 changes: 0 additions & 34 deletions ExternTinyXML.cmake

This file was deleted.

1 change: 1 addition & 0 deletions include/navutil.h
Expand Up @@ -43,6 +43,7 @@

#include "bbox.h"
#include "chcanv.h"
#include "tinyxml.h"
#include "chartdbs.h"
#include "RoutePoint.h"
#include "vector2D.h"
Expand Down
1 change: 1 addition & 0 deletions include/styles.h
Expand Up @@ -25,6 +25,7 @@
**************************************************************************/

#pragma once
#include <tinyxml.h>

#include "ocpn_types.h"

Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion src/styles.cpp
Expand Up @@ -32,7 +32,6 @@
#include <wx/filename.h>
#include <wx/dir.h>
#include <stdlib.h>
#include <tinyxml.h>

#include "styles.h"
#include "chart1.h"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/undo.cpp
Expand Up @@ -42,6 +42,7 @@
#include "routeman.h"
#include "routeprop.h"
#include "routemanagerdialog.h"
#include "tinyxml.h"
#include "undo.h"
#include "chcanv.h"

Expand Down
25 changes: 0 additions & 25 deletions src_extern/README.md

This file was deleted.

42 changes: 0 additions & 42 deletions src_extern/tinyxml-2.6.2/CMakeLists.txt

This file was deleted.

111 changes: 0 additions & 111 deletions src_extern/tinyxml-2.6.2/tinystr.cpp

This file was deleted.

2 comments on commit b1f1630

@bdbcat
Copy link
Member

@bdbcat bdbcat commented on b1f1630 Mar 5, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mario...

Nice patch, but not quite there yet.

  1. On CMake 2.8.0, I had to modify ExternTinyXML.cmake like this to compensate for a bug in CMake:

ExternalProject_Add(extern_tinyxml
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/tinyxml"
URL file://${CMAKE_CURRENT_SOURCE_DIR}/src_extern/tinyxml-2.6.2
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src_extern/tinyxml-2.6.2"

  1. But even with this change, I get the following error:

-- Extern: TinyXML 2.6.2
CMake Error at ExternTinyXML.cmake:32 (add_dependencies):
add_dependencies Adding dependency to non-existent target: tinyxml
Call Stack (most recent call first):
CMakeLists.txt:548 (INCLUDE)

So, I have reverted the Pull request.

  1. Finally, we use hard spaces instead of tabs in the source code. Please follow our whitespace format.

Dave

@mariokonrad
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Dave

It seems it is a problem with CMake (http://www.cmake.org/Bug/print_bug_page.php?bug_id=10395), but fixed in 2.8.4
On the homepage you stated Cmake version 2.8.3 as the (minimum) version required in order to build.

How would you like to proceed? Still interested in the patch and upgrade cmake or dismiss the patch?

Sorry, I was not aware of the 4 whitespace rule, did you define it final recently? I assume this also applies to CMakeLists.txt?

Bye,
Mario

edit:
Just found this: a compatiblity matrix for cmake: http://www.cmake.org/Wiki/CMake_Version_Compatibility_Matrix

Please sign in to comment.