Skip to content

Build as shared library #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 14, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,35 @@ cmake_minimum_required(VERSION 2.8)
include_directories(${CMAKE_SOURCE_DIR}/include)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")

set(pugi_HDRS
include/pugixml/pugiconfig.hpp
include/pugixml/pugixml.hpp
)
include/pugixml/pugixml.hpp)

set(pugi_SRCS
src/pugixml/pugixml.cpp
)

add_library(pugi ${pugi_HDRS} ${pugi_SRCS})
src/pugixml/pugixml.cpp)

set(tmx_HDRS

include/tmx/MapLayer.h
include/tmx/MapLoader.h
include/tmx/MapObject.h
include/tmx/QuadTreeNode.h
)
include/tmx/DebugShape.h
include/tmx/Helpers.h)

set(tmx_SRCS
src/DebugShape.cpp
src/DebugShape.cpp
src/MapLoaderPublic.cpp
src/MapLoaderPrivate.cpp
src/MapLayer.cpp
src/MapObject.cpp
src/QuadTreeNode.cpp
)
src/QuadTreeNode.cpp)

add_library(${PROJECT_NAME} ${tmx_HDRS} ${tmx_SRCS})
add_library(pugi SHARED ${pugi_HDRS} ${pugi_SRCS})
add_library(${PROJECT_NAME} SHARED ${tmx_HDRS} ${tmx_SRCS})
install(TARGETS pugi ${PROJECT_NAME} LIBRARY DESTINATION lib)
install(FILES ${pugi_HDRS} ${tmx_HDRS} DESTINATION include)
install(FILES ${tmx_HDRS} DESTINATION include/tmx)
install(FILES ${pugi_HDRS} DESTINATION include/pugixml)

FILE(GLOB maps "${CMAKE_CURRENT_SOURCE_DIR}/maps/*")
install(FILES ${maps} DESTINATION share/tmx/examples/maps)
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions include/tmx/MapObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ it freely, subject to the following restrictions:

#include <SFML/System/NonCopyable.hpp>

#include <Helpers.h>
#include <DebugShape.h>
#include <tmx/Helpers.h>
#include <tmx/DebugShape.h>

namespace tmx
{
Expand Down Expand Up @@ -200,4 +200,4 @@ namespace tmx
typedef std::vector<MapTile> MapTiles;
};

#endif //MAP_OBJECT_H
#endif //MAP_OBJECT_H
4 changes: 2 additions & 2 deletions src/DebugShape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ and must not be misrepresented as being the original software.
source distribution.
*********************************************************************/

#include <DebugShape.h>
#include <tmx/DebugShape.h>
#include <SFML/Graphics/RenderTarget.hpp>

DebugShape::DebugShape()
Expand Down Expand Up @@ -70,4 +70,4 @@ void DebugShape::draw(sf::RenderTarget& rt, sf::RenderStates states) const
{
states.transform *= getTransform();
rt.draw(m_array, states);
}
}