Issue 52 in vrjuggler: CMake find scripts for VR Juggler

14 views
Skip to first unread message

vrju...@googlecode.com

unread,
Mar 22, 2013, 3:39:01 PM3/22/13
to vrjuggl...@googlegroups.com
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

vrju...@googlecode.com

unread,
Mar 22, 2013, 3:53:24 PM3/22/13
to vrjuggl...@googlegroups.com

Comment #1 on issue 52 by karls...@gmail.com: CMake find scripts for VR
Juggler
http://code.google.com/p/vrjuggler/issues/detail?id=52

Whoops, this should be an "Enhancement", not a "Defect", sorry.

vrju...@googlecode.com

unread,
Apr 27, 2013, 3:01:45 PM4/27/13
to vrjuggl...@googlegroups.com
Updates:
Labels: -Type-Defect Type-Enhancement

Comment #2 on issue 52 by patrick....@gmail.com: CMake find scripts for VR
Juggler
http://code.google.com/p/vrjuggler/issues/detail?id=52

(No comment was entered for this change.)

vrju...@googlecode.com

unread,
May 13, 2013, 3:45:41 PM5/13/13
to vrjuggl...@googlegroups.com

Comment #3 on issue 52 by karls...@gmail.com: CMake find scripts for VR
Juggler
http://code.google.com/p/vrjuggler/issues/detail?id=52

I've attached an updated version of the find scripts. These new scripts
support version checking by passing the version info obtained from Flagpoll
along to the find_package_handle_standard_args() function.

For example, you can now do:

find_package (VRJuggler 3.1.8 EXACT REQUIRED )

And the scripts will check that you have exactly version 3.1.8 of VR
Juggler.

Attachments:
vrj-cmake-scripts-with-versioning.tar.bz2 5.3 KB

vrju...@googlecode.com

unread,
Jun 21, 2013, 6:54:20 PM6/21/13
to vrjuggl...@googlegroups.com

Comment #4 on issue 52 by karls...@gmail.com: CMake find scripts for VR
Juggler
http://code.google.com/p/vrjuggler/issues/detail?id=52

Yet another update. This one includes a much cleaner FindFlagpoll.cmake,
based on Ryan Pavlik's FindFlagpoll.cmake from his CMake-ified VR Juggler
branch.

Attachments:
vrj-cmake-scripts-with-versioning.tar.bz2 4.1 KB
Reply all
Reply to author
Forward
0 new messages