From: David Gow Date: Wed, 26 Mar 2014 15:57:37 +0000 (+0800) Subject: CMake support. We don't have to use it, but it's there if we do. X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=d2f8c31e5652bd6143bd42fd4db9e29dcbe4339b;p=ipdf%2Fcode.git CMake support. We don't have to use it, but it's there if we do. --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..8582b7f --- /dev/null +++ b/src/CMakeLists.txt @@ -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} +) diff --git a/src/main.cpp b/src/main.cpp index 5fa94b7..2a85c14 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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);