@@ -23,10 +23,57 @@ if(CMAKE_COMPILER_IS_GNUCXX)
23
23
set (CMAKE_CXX_FLAGS "-std=c++0x" )
24
24
endif ()
25
25
26
+ # Build KoRE library
26
27
file (GLOB_RECURSE SOURCES src/KoRE/*.cpp)
27
28
file (GLOB_RECURSE HEADER src/KoRE/*.h)
28
29
add_library (KoRE ${SOURCES} ${HEADER} )
29
30
include_directories (src)
31
+ include_directories (D:/GitHub/KoRE/ext /include /tinyxml)
32
+ include_directories (demos/contrib)
33
+
34
+ # Build Clipper library (?!)
35
+ file (GLOB_RECURSE SOURCES ext /contrib/clipper/*.cpp)
36
+ file (GLOB_RECURSE HEADER ext /contrib/clipper/*.hpp)
37
+ add_library (clipper ${SOURCES} ${HEADER} )
38
+
39
+ # Build Tinyxml library (?!)
40
+ #file(GLOB_RECURSE SOURCES ext/include/tinyxml/*.cpp)
41
+ #file(GLOB_RECURSE HEADER ext/include/tinyxml/*.h)
42
+ #add_library(tinyxml ${SOURCES} ${HEADER})
43
+ #include_directories( ext/include/tinyxml)
44
+
45
+ # Build poly2Tri library (?!)
46
+ file (GLOB_RECURSE SOURCES ext /contrib/poly2tri/poly2tri/*.cpp)
47
+ file (GLOB_RECURSE HEADER ext /contrib/poly2tri/poly2tri/*.h)
48
+ #add_library(p2t ${SOURCES} ${HEADER})
49
+ #SET_TARGET_PROPERTIES(p2t PROPERTIES LINKER_LANGUAGE C)
50
+
51
+
52
+
53
+ #########
54
+ # Link external libraries to KoRE
55
+ set (CMAKE_LIBRARY_PATH ${CMAKE_SOURCE_DIR} /lib)
56
+ link_directories (${CMAKE_LIBRARY_PATH} )
57
+ include_directories (${CMAKE_LIBRARY_PATH} )
58
+
59
+ add_library ( glew32 STATIC IMPORTED )
60
+ set_target_properties ( glew32 PROPERTIES IMPORTED_LOCATION ${CMAKE_LIBRARY_PATH} /libglew32.dll.a )
61
+ target_link_libraries (KoRE glew32)
62
+
63
+ add_library ( assimp STATIC IMPORTED )
64
+ set_target_properties ( assimp PROPERTIES IMPORTED_LOCATION ${CMAKE_LIBRARY_PATH} /libassimp.a )
65
+ target_link_libraries (KoRE assimp)
66
+
67
+ #add_library( tinyxml STATIC IMPORTED)
68
+ #set_target_properties( tinyxml PROPERTIES IMPORTED_LOCATION ${CMAKE_LIBRARY_PATH}/tinyxml.lib)
69
+ #target_link_libraries(KoRE tinyxml)
70
+
71
+ target_link_libraries (KoRE opengl32)
72
+ target_link_libraries (KoRE clipper)
73
+ target_link_libraries (KoRE p2t)
74
+
75
+
76
+ ##########
30
77
31
78
set (IGNORE "-build/include" )
32
79
@@ -43,7 +90,7 @@ if(WIN32)
43
90
add_definitions (-DGLFW_INCLUDE_GL3)
44
91
endif ()
45
92
46
- set (CMAKE_LIBRARY_PATH " ${CMAKE_SOURCE_DIR} /lib" )
93
+ set (CMAKE_LIBRARY_PATH ${CMAKE_SOURCE_DIR} /lib)
47
94
48
95
#if(MSVC)
49
96
# INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ext/include)
0 commit comments