From 0356af272cb2d8828f2e2e33b6335f11c6d797b6 Mon Sep 17 00:00:00 2001 From: psperl Date: Thu, 14 Jun 2007 03:17:59 +0000 Subject: [PATCH] Added USE_DEBUG cmake option and generating pkgconfig. git-svn-id: https://projectm.svn.sourceforge.net/svnroot/projectm/trunk@172 6778bc44-b910-0410-a7a0-be141de4315d --- src/projectM-engine/CMakeLists.txt | 14 +++++++++++--- src/projectM-engine/libprojectM.pc.in | 14 ++++++++++++++ 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 src/projectM-engine/libprojectM.pc.in diff --git a/src/projectM-engine/CMakeLists.txt b/src/projectM-engine/CMakeLists.txt index 0e9d13a9e..e072d09e1 100644 --- a/src/projectM-engine/CMakeLists.txt +++ b/src/projectM-engine/CMakeLists.txt @@ -2,6 +2,7 @@ PROJECT(projectM) ADD_LIBRARY(projectM SHARED projectM.cpp projectM.h pbuffer.cpp pbuffer.h InitCond.cpp InitCond.h console_interface.cpp Expr.cpp PCM.cpp Parser.cpp Preset.cpp common.h BeatDetect.cpp PCM.h PerPixelEqn.cpp Eval.h SplayTree.cpp Param.cpp CustomWave.cpp CustomShape.h CustomShape.cpp Param.h CustomWave.h BeatDetect.h Preset.h menu.cpp console_interface.h Func.h Func.cpp Eval.cpp wipemalloc.h browser.cpp PerFrameEqn.cpp PerPointEqn.cpp editor.cpp fftsg.cpp glConsole.cpp CValue.h Expr.h timer.cpp wipemalloc.cpp PerFrameEqn.h PerPixelEqn.h PerPointEqn.h browser.h builtin_funcs.h compare.h editor.h event.h fatal.h SplayTree.h fftsg.h glConsole.h menu.h timer.h SplayNode.cpp SplayNode.h) OPTION(USE_FTGL "Use FTGL for on-screen fonts" ON) +OPTION(USE_DEBUG "Enable Debugging Output" OFF) ADD_DEFINITIONS(-DLINUX -DFBO) @@ -9,6 +10,10 @@ FIND_PACKAGE(OpenGL) INCLUDE(FindPkgConfig.cmake) +IF(USE_DEBUG) + ADD_DEFINITIONS(-DUSE_DEBUG) +ENDIF(USE_DEBUG) + IF(USE_FTGL) pkg_search_module (FTGL ftgl) ADD_DEFINITIONS(-DUSE_FTGL) @@ -18,10 +23,13 @@ ENDIF(USE_FTGL) TARGET_LINK_LIBRARIES(projectM GLEW m) +CONFIGURE_FILE("libprojectM.pc.in" "libprojectM.pc" @ONLY) +INSTALL(FILES "${CMAKE_BINARY_DIR}/libprojectM.pc" DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) + INSTALL(TARGETS projectM DESTINATION lib) INSTALL(FILES projectM.h pbuffer.h PCM.h BeatDetect.h Preset.h event.h console_interface.h dlldefs.h fatal.h PCM.h DESTINATION include/libprojectM) -INSTALL(FILES config DESTINATION share/projectM) +INSTALL(FILES config DESTINATION ${CMAKE_INSTALL_PREFIX}/share/projectM) FILE(GLOB presets "presets/*.milk") -INSTALL(FILES ${presets} DESTINATION share/projectM/presets) +INSTALL(FILES ${presets} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/projectM/presets) FILE(GLOB fonts "fonts/*.ttf") -INSTALL(FILES ${fonts} DESTINATION share/projectM/fonts) \ No newline at end of file +INSTALL(FILES ${fonts} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/projectM/fonts) \ No newline at end of file diff --git a/src/projectM-engine/libprojectM.pc.in b/src/projectM-engine/libprojectM.pc.in new file mode 100644 index 000000000..ac40932be --- /dev/null +++ b/src/projectM-engine/libprojectM.pc.in @@ -0,0 +1,14 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +libdir=@CMAKE_INSTALL_PREFIX@/lib +includedir=@CMAKE_INSTALL_PREFIX@/include +pkgdatadir=@CMAKE_INSTALL_PREFIX@/share/projectM +sysconfdir=@CMAKE_INSTALL_PREFIX@/share/projectM + +Name: libprojectM +Version: 1.00 +Description: projectM - OpenGL Milkdrop +Requires: +Libs: -L${libdir} +Cflags: -I${includedir} +