Skip to content

Commit 39b4a5c

Browse files
committed
Merge pull request #12 from kalarepa/master
Build as shared library
2 parents b9b9e89 + 5e5d99d commit 39b4a5c

File tree

5 files changed

+16
-18
lines changed

5 files changed

+16
-18
lines changed

CMakeLists.txt

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,35 @@ cmake_minimum_required(VERSION 2.8)
33
include_directories(${CMAKE_SOURCE_DIR}/include)
44
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
55
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
6+
67
set(pugi_HDRS
78
include/pugixml/pugiconfig.hpp
8-
include/pugixml/pugixml.hpp
9-
)
9+
include/pugixml/pugixml.hpp)
1010

1111
set(pugi_SRCS
12-
src/pugixml/pugixml.cpp
13-
)
14-
15-
add_library(pugi ${pugi_HDRS} ${pugi_SRCS})
12+
src/pugixml/pugixml.cpp)
1613

1714
set(tmx_HDRS
18-
1915
include/tmx/MapLayer.h
2016
include/tmx/MapLoader.h
2117
include/tmx/MapObject.h
2218
include/tmx/QuadTreeNode.h
23-
)
19+
include/tmx/DebugShape.h
20+
include/tmx/Helpers.h)
2421

2522
set(tmx_SRCS
26-
src/DebugShape.cpp
23+
src/DebugShape.cpp
2724
src/MapLoaderPublic.cpp
2825
src/MapLoaderPrivate.cpp
2926
src/MapLayer.cpp
3027
src/MapObject.cpp
31-
src/QuadTreeNode.cpp
32-
)
28+
src/QuadTreeNode.cpp)
3329

34-
add_library(${PROJECT_NAME} ${tmx_HDRS} ${tmx_SRCS})
30+
add_library(pugi SHARED ${pugi_HDRS} ${pugi_SRCS})
31+
add_library(${PROJECT_NAME} SHARED ${tmx_HDRS} ${tmx_SRCS})
3532
install(TARGETS pugi ${PROJECT_NAME} LIBRARY DESTINATION lib)
36-
install(FILES ${pugi_HDRS} ${tmx_HDRS} DESTINATION include)
33+
install(FILES ${tmx_HDRS} DESTINATION include/tmx)
34+
install(FILES ${pugi_HDRS} DESTINATION include/pugixml)
3735

3836
FILE(GLOB maps "${CMAKE_CURRENT_SOURCE_DIR}/maps/*")
3937
install(FILES ${maps} DESTINATION share/tmx/examples/maps)
File renamed without changes.
File renamed without changes.

include/tmx/MapObject.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ it freely, subject to the following restrictions:
4949

5050
#include <SFML/System/NonCopyable.hpp>
5151

52-
#include <Helpers.h>
53-
#include <DebugShape.h>
52+
#include <tmx/Helpers.h>
53+
#include <tmx/DebugShape.h>
5454

5555
namespace tmx
5656
{
@@ -200,4 +200,4 @@ namespace tmx
200200
typedef std::vector<MapTile> MapTiles;
201201
};
202202

203-
#endif //MAP_OBJECT_H
203+
#endif //MAP_OBJECT_H

src/DebugShape.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ and must not be misrepresented as being the original software.
2727
source distribution.
2828
*********************************************************************/
2929

30-
#include <DebugShape.h>
30+
#include <tmx/DebugShape.h>
3131
#include <SFML/Graphics/RenderTarget.hpp>
3232

3333
DebugShape::DebugShape()
@@ -70,4 +70,4 @@ void DebugShape::draw(sf::RenderTarget& rt, sf::RenderStates states) const
7070
{
7171
states.transform *= getTransform();
7272
rt.draw(m_array, states);
73-
}
73+
}

0 commit comments

Comments
 (0)