Skip to content

Commit

Permalink
Add headers in project files generated by cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-dejoue committed Oct 26, 2020
1 parent c480777 commit 5aa0c22
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ option(P2T_BUILD_TESTS "Build tests" OFF)
option(P2T_BUILD_TESTBED "Build the testbed application" OFF)

file(GLOB SOURCES poly2tri/common/*.cc poly2tri/sweep/*.cc)
add_library(poly2tri ${SOURCES})
file(GLOB HEADERS poly2tri/*.h poly2tri/common/*.h poly2tri/sweep/*.h)
add_library(poly2tri ${SOURCES} ${HEADERS})
target_include_directories(poly2tri INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})

if(P2T_BUILD_TESTS)
Expand Down
20 changes: 12 additions & 8 deletions testbed/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,22 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <cstdlib>
#include <poly2tri/poly2tri.h>

#include <GLFW/glfw3.h>
#include <time.h>
#include <fstream>
#include <string>
#include <sstream>

#include <algorithm>
#include <iterator>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <iostream>
using namespace std;
#include <iterator>
#include <list>
#include <sstream>
#include <string>
#include <vector>

#include "../poly2tri/poly2tri.h"
using namespace std;
using namespace p2t;

void Init();
Expand Down
4 changes: 3 additions & 1 deletion unittest/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
#endif
#define BOOST_TEST_MODULE Poly2triTest

#include <poly2tri/poly2tri.h>

#include <boost/filesystem/path.hpp>
#include <boost/test/unit_test.hpp>
#include <poly2tri/poly2tri.h>

#include <fstream>
#include <iostream>
#include <iterator>
Expand Down

0 comments on commit 5aa0c22

Please sign in to comment.