Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 52 by
karls...@gmail.com: CMake find scripts for VR Juggler
http://code.google.com/p/vrjuggler/issues/detail?id=52
I present to you a set of CMake find scripts that make it easier to use VR
Juggler in CMake-based projects. These scripts piggyback off of Flagpoll to
do the actual heavy lifting, and then parse the results and present them in
a CMake-friendly format. The FindFlagpoll.cmake is based heavily on CMake's
own FindPkgConfig.cmake.
I was able to use these scripts to successfully build VR
Juggler's "SimpleApp" OpenGL example on Windows (Visual Studio) and on Mac
OS X.
On the Visual Studio side, the scripts are set up to use auto-linking. I'd
appreciate any comments on my use of link_directories in the find scripts.
My motivation there was to make auto-linking work without any additional
setup in the top-level CMakeLists.txt, but if there's a better way to do
things, I'm all for it.
Here's an example of how you would use the scripts in a project:
cmake_minimum_required( VERSION 2.8 )
project( simpleApp CXX )
find_package( VRJuggler-OpenGL REQUIRED )
include_directories( ${VRJUGGLER_INCLUDE_DIRS} )
set( SOURCES ${CMAKE_SOURCE_DIR}/simpleApp.cpp
${CMAKE_SOURCE_DIR}/main.cpp )
add_definitions( ${VRJUGGLER_DEFINITIONS} ) # <-- this is important on
Windows, since it pulls in /DBOOST_ALL_DYN_LINK
add_executable( ${PROJECT_NAME} ${SOURCES} )
target_link_libraries( ${PROJECT_NAME} ${VRJUGGLER-OPENGL_LIBRARIES} )
Attachments:
juggler-cmake-scripts.tar.bz2 5.2 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings