CMake support. We don't have to use it, but it's there if we do.
authorDavid Gow <david@ingeniumdigital.com>
Wed, 26 Mar 2014 15:57:37 +0000 (23:57 +0800)
committerDavid Gow <david@ingeniumdigital.com>
Wed, 26 Mar 2014 15:57:37 +0000 (23:57 +0800)
src/CMakeLists.txt [new file with mode: 0644]
src/main.cpp

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..8582b7f
--- /dev/null
@@ -0,0 +1,43 @@
+cmake_minimum_required(VERSION 2.8)
+
+include(FindPkgConfig)
+pkg_search_module(SDL2 REQUIRED sdl2)
+
+project(ipdf)
+
+set(CMAKE_CXX_FLAGS "-std=gnu++0x")
+
+include_directories(${SDL2_INCLUDE_DIRS})
+
+add_library(ipdflib
+common.h
+log.h
+log.cpp
+ipdf.h
+view.h
+view.cpp
+document.h
+document.cpp
+screen.h
+screen.cpp
+)
+
+add_executable(ipdf
+main.cpp
+)
+
+target_link_libraries(ipdf
+ipdflib
+GL
+${SDL2_LIBRARIES}
+)
+
+add_executable(ipdf-testsaveload
+tests/saveload.cpp
+)
+
+target_link_libraries(ipdf-testsaveload
+ipdflib
+GL
+${SDL2_LIBRARIES}
+)
index 5fa94b7..2a85c14 100644 (file)
@@ -11,7 +11,7 @@ int main(int argc, char ** argv)
 {
        Document doc;
        srand(time(NULL));
-       doc.Add(Random(), Random(), Random(), Random());
+       doc.Add(RECT_FILLED, Rect(Random(), Random(), Random(), Random()));
 
        View view(doc);
 

UCC git Repository :: git.ucc.asn.au