-
Notifications
You must be signed in to change notification settings - Fork 964
Fix all blocks and samples on linux, add cairo support #2134
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
Closed
Closed
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8337979
Added cmakes in blocks/ - box2D and basicapp (#1)
c310e72
Added RESOURCES to samples/Arcball cmake
e4a098b
Fixed opengl samples for linux
59ff17b
Fixed samples/SurfaceBasic cmake
de76656
Added cmakelists for samples/HighDensityDisplay
f1e4762
Fixed samples/CameraPersp cmakelists
8abbe5f
Fixed samples/_timeline linux builds
6ab94eb
Added blocks/Clipper cmake config
c46edbc
Added cmakelists to blocks/OSC test
600cca2
Added cairo block cmake config and updated xml
7dd067e
Fixed cairo block compilation on linux
7341bc6
Merge branch 'linux-cairo-support' into missing-cmakes, closes #4
c47cfe1
Fixed cmakelists of all _svg samples, now supported on linux
ff4aba4
Improved cairo cmake config
acf279b
Added list of unsupported samples in linux cmake
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
blocks/Box2D/templates/Basic Box2D/proj/cmake/CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| cmake_minimum_required( VERSION 2.8 FATAL_ERROR ) | ||
| set( CMAKE_VERBOSE_MAKEFILE ON ) | ||
|
|
||
| project( BasicBox2D ) | ||
| set( APP_NAME "${PROJECT_NAME}App" ) | ||
|
|
||
| get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.." ABSOLUTE ) | ||
| get_filename_component( APP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE ) | ||
|
|
||
| include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" ) | ||
|
|
||
| ci_make_app( | ||
| APP_NAME ${APP_NAME} | ||
| SOURCES ${APP_PATH}/src/_TBOX_PREFIX_App.cpp | ||
| CINDER_PATH ${CINDER_PATH} | ||
| BLOCKS Box2D | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| if( NOT TARGET Cairo ) | ||
| get_filename_component( CAIRO_SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../src" ABSOLUTE ) | ||
| get_filename_component( CAIRO_INCLUDE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../include" ABSOLUTE ) | ||
|
|
||
| list( APPEND CAIRO_SOURCES | ||
| ${CAIRO_SOURCE_PATH}/Cairo.cpp | ||
| ) | ||
|
|
||
| add_library( Cairo ${CAIRO_SOURCES} ) | ||
|
|
||
| target_include_directories( Cairo PUBLIC "${CAIRO_INCLUDE_PATH}" ) | ||
| target_link_libraries( Cairo PRIVATE cinder ) | ||
|
|
||
| # sudo apt-get install libcairo2-dev | ||
| set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}" ) | ||
| find_package( Cairo REQUIRED ) | ||
| target_include_directories( Cairo PUBLIC "${CAIRO_INCLUDE_DIRS}") | ||
| target_link_libraries( Cairo PUBLIC "${CAIRO_LIBRARIES}") | ||
|
|
||
| # sudo apt-get install libfreetype6-dev | ||
| find_package( Freetype REQUIRED ) | ||
| target_include_directories( Cairo PRIVATE ${FREETYPE_INCLUDE_DIRS} ) | ||
| target_link_libraries( Cairo PRIVATE ${FREETYPE_LIBRARIES} ) | ||
| endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| # - Try to find Cairo | ||
| # Once done, this will define | ||
| # | ||
| # CAIRO_FOUND - system has Cairo | ||
| # CAIRO_INCLUDE_DIRS - the Cairo include directories | ||
| # CAIRO_LIBRARIES - link these to use Cairo | ||
| # | ||
| # Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org> | ||
| # | ||
| # Redistribution and use in source and binary forms, with or without | ||
| # modification, are permitted provided that the following conditions | ||
| # are met: | ||
| # 1. Redistributions of source code must retain the above copyright | ||
| # notice, this list of conditions and the following disclaimer. | ||
| # 2. Redistributions in binary form must reproduce the above copyright | ||
| # notice, this list of conditions and the following disclaimer in the | ||
| # documentation and/or other materials provided with the distribution. | ||
| # | ||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS CONTRIBUTORS ``AS | ||
| # IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ITS | ||
| # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
| # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
| # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; | ||
| # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
| # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
| # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
| # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
|
||
| find_package(PkgConfig) | ||
| pkg_check_modules(PC_CAIRO QUIET cairo) | ||
|
|
||
| find_path(CAIRO_INCLUDE_DIRS | ||
| NAMES cairo.h | ||
| HINTS ${PC_CAIRO_INCLUDEDIR} | ||
| ${PC_CAIRO_INCLUDE_DIRS} | ||
| PATH_SUFFIXES cairo | ||
| ) | ||
|
|
||
| find_library(CAIRO_LIBRARIES | ||
| NAMES cairo | ||
| HINTS ${PC_CAIRO_LIBDIR} | ||
| ${PC_CAIRO_LIBRARY_DIRS} | ||
| ) | ||
|
|
||
| if (CAIRO_INCLUDE_DIRS) | ||
| if (EXISTS "${CAIRO_INCLUDE_DIRS}/cairo-version.h") | ||
| file(READ "${CAIRO_INCLUDE_DIRS}/cairo-version.h" CAIRO_VERSION_CONTENT) | ||
|
|
||
| string(REGEX MATCH "#define +CAIRO_VERSION_MAJOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}") | ||
| set(CAIRO_VERSION_MAJOR "${CMAKE_MATCH_1}") | ||
|
|
||
| string(REGEX MATCH "#define +CAIRO_VERSION_MINOR +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}") | ||
| set(CAIRO_VERSION_MINOR "${CMAKE_MATCH_1}") | ||
|
|
||
| string(REGEX MATCH "#define +CAIRO_VERSION_MICRO +([0-9]+)" _dummy "${CAIRO_VERSION_CONTENT}") | ||
| set(CAIRO_VERSION_MICRO "${CMAKE_MATCH_1}") | ||
|
|
||
| set(CAIRO_VERSION "${CAIRO_VERSION_MAJOR}.${CAIRO_VERSION_MINOR}.${CAIRO_VERSION_MICRO}") | ||
| endif () | ||
| endif () | ||
|
|
||
| if ("${Cairo_FIND_VERSION}" VERSION_GREATER "${CAIRO_VERSION}") | ||
| message(FATAL_ERROR "Required version (" ${Cairo_FIND_VERSION} ") is higher than found version (" ${CAIRO_VERSION} ")") | ||
| endif () | ||
|
|
||
| include(FindPackageHandleStandardArgs) | ||
| FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cairo REQUIRED_VARS CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES | ||
| VERSION_VAR CAIRO_VERSION) | ||
|
|
||
| mark_as_advanced( | ||
| CAIRO_INCLUDE_DIRS | ||
| CAIRO_LIBRARIES | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| if( NOT TARGET Clipper ) | ||
| get_filename_component( CLIPPER_SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../src" ABSOLUTE ) | ||
|
|
||
| add_library( CLIPPER | ||
| ${CLIPPER_SOURCE_PATH}/clipper.cpp | ||
| ${CLIPPER_SOURCE_PATH}/CinderClipper.cpp | ||
| ) | ||
|
|
||
| target_include_directories( CLIPPER PUBLIC "${CLIPPER_SOURCE_PATH}"/../include ) | ||
| endif() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| cmake_minimum_required( VERSION 2.8 FATAL_ERROR ) | ||
| set( CMAKE_VERBOSE_MAKEFILE ON ) | ||
|
|
||
| project( OSC-Test ) | ||
|
|
||
| get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.." ABSOLUTE ) | ||
| get_filename_component( APP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE ) | ||
|
|
||
| include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" ) | ||
|
|
||
| ci_make_app( | ||
| SOURCES ${APP_PATH}/src/TestApp.cpp | ||
| CINDER_PATH ${CINDER_PATH} | ||
| BLOCKS OSC | ||
| ) |
23 changes: 23 additions & 0 deletions
23
blocks/__AppTemplates/BasicApp/OpenGL/proj/cmake/CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| cmake_minimum_required( VERSION 2.8 FATAL_ERROR ) | ||
| set( CMAKE_VERBOSE_MAKEFILE ON ) | ||
|
|
||
| project( Basic ) | ||
|
|
||
| get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.." ABSOLUTE ) | ||
| get_filename_component( APP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE ) | ||
|
|
||
| # wildcard on resources | ||
| file (GLOB APP_RESOURCES | ||
| ${APP_PATH}/resources/* | ||
| ) | ||
|
|
||
| include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" ) | ||
|
|
||
| ci_make_app( | ||
| APP_NAME ${PROJECT_NAME}App | ||
| CINDER_PATH ${CINDER_PATH} | ||
| SOURCES ${APP_PATH}/src/_TBOX_PREFIX_App.cpp | ||
| INCLUDES ${APP_PATH}/include | ||
| RESOURCES ${APP_RESOURCES} | ||
| ASSETS_PATH ${APP_PATH}/assets | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| cmake_minimum_required( VERSION 2.8 FATAL_ERROR ) | ||
| set( CMAKE_VERBOSE_MAKEFILE ON ) | ||
|
|
||
| project( HighIntensityDisplay ) | ||
|
|
||
| get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../.." ABSOLUTE ) | ||
| get_filename_component( APP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE ) | ||
|
|
||
| include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" ) | ||
|
|
||
| ci_make_app( | ||
| SOURCES ${APP_PATH}/src/HighDensityDisplayApp.cpp | ||
| CINDER_PATH ${CINDER_PATH} | ||
| INCLUDES ${APP_PATH}/include | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
samples/_opengl/LevelOfDetailBasic/proj/cmake/CMakeLists.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| cmake_minimum_required( VERSION 2.8 FATAL_ERROR ) | ||
| set( CMAKE_VERBOSE_MAKEFILE ON ) | ||
|
|
||
| project( opengl-LevelOfDetailBasic ) | ||
|
|
||
| get_filename_component( CINDER_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../.." ABSOLUTE ) | ||
| get_filename_component( APP_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../" ABSOLUTE ) | ||
|
|
||
| include( "${CINDER_PATH}/proj/cmake/modules/cinderMakeApp.cmake" ) | ||
|
|
||
| ci_make_app( | ||
| SOURCES ${APP_PATH}/src/LevelOfDetailBasicApp.cpp | ||
| CINDER_PATH ${CINDER_PATH} | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.