Skip to content
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

setup repo to be easy integrated as external library #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -3,8 +3,12 @@ project (a-star)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

include_directories(source)
option(BUILD_EXAMPLE "Build a-star example" OFF)
add_library(a-star source/AStar.cpp)

add_executable(main main.cpp)
target_link_libraries(main a-star)
if(BUILD_EXAMPLE)
add_executable(main main.cpp)
target_link_libraries(main a-star)
endif()

target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/incl)
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion source/AStar.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include "AStar.hpp"
#include <algorithm>
#include <cmath>
#include "a-star/AStar.hpp"

using namespace std::placeholders;
using namespace std;

bool AStar::Vec2i::operator == (const Vec2i& coordinates_)
{