Last active
February 29, 2016 15:44
-
-
Save stubb/d856cdcedbe674532826 to your computer and use it in GitHub Desktop.
Patch for oglft to include freetype path and allow shared building.
This file contains 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
Index: CMakeLists.txt | |
=================================================================== | |
--- CMakeLists.txt (Revision 112) | |
+++ CMakeLists.txt (Arbeitskopie) | |
@@ -1,10 +1,13 @@ | |
# $Id$ | |
project( OGLFT ) | |
-set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/config ) | |
+#set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/config ) | |
find_package( OpenGL REQUIRED ) | |
find_package( Freetype REQUIRED ) | |
+if(FREETYPE_FOUND) | |
+ INCLUDE_DIRECTORIES(${FREETYPE_INCLUDE_DIRS}) | |
+endif(FREETYPE_FOUND) | |
if( ENABLE_QT ) | |
find_package( Qt REQUIRED ) | |
@@ -52,8 +55,20 @@ | |
endif(WIN32 OR CMAKE_SYSTEM_NAME MATCHES "Linux") | |
endif(NOT GLU_TESS_CALLBACK_TRIPLEDOT) | |
-add_subdirectory( liboglft ) | |
- | |
+OPTION(BUILD_OGFLT_SHARED "Build the OGLFT library as a shared library." ON) | |
+IF(BUILD_OGFLT_SHARED) | |
+ SET(OGLFT_LIBRARY_TYPE SHARED) | |
+ELSE(BUILD_OGFLT_SHARED) | |
+ SET(OGLFT_LIBRARY_TYPE STATIC) | |
+ENDIF(BUILD_OGFLT_SHARED) | |
+add_library(${PROJECT_NAME} ${OGLFT_LIBRARY_TYPE} liboglft) | |
+set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX) | |
+ | |
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib${LIB_SUFFIX} PERMISSIONS | |
+ OWNER_READ OWNER_WRITE OWNER_EXECUTE | |
+ GROUP_READ GROUP_EXECUTE | |
+ WORLD_READ WORLD_EXECUTE) | |
+ | |
set( BUILD_TESTS OFF CACHE BOOL "Build tests." ) | |
if( BUILD_TESTS ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment