I'm new to cmake so I'm not sure if these are problems with my CMakeLists.txt files or UsePlayerPlugin.cmake.in.
I'm getting the following errors when attempting to build my plugin on ubuntu 9.04:
$ cmake --version
cmake version 2.6-patch 2
$ cmake ..
CMake Error at /usr/local/share/cmake/Modules/UsePlayerPlugin.cmake:4 (CMAKE_POLICY):
Policy "CMP0011" is not known to this version of CMake.
Call Stack (most recent call first):
firmatastd/CMakeLists.txt:6 (INCLUDE)
CMake Error at /usr/local/share/cmake/Modules/UsePlayerPlugin.cmake:115 (SET_TARGET_PROPERTIES):
set_target_properties called with incorrect number of arguments.
Call Stack (most recent call first):
firmatastd/CMakeLists.txt:18 (PLAYER_ADD_PLUGIN_DRIVER)
The attached patch got rid of the errors.
$ cat ../firmatastd/CMakeLists.txt
CMAKE_MINIMUM_REQUIRED (VERSION 2.4 FATAL_ERROR)
PROJECT (firmatastd)
# Include this CMake module to get most of the settings needed to build
SET (CMAKE_MODULE_PATH "@CMAKE_INSTALL_PREFIX@/share/cmake/Modules")
INCLUDE (UsePlayerPlugin)
INCLUDE (FindPkgConfig)
IF (NOT PKG_CONFIG_FOUND)
MESSAGE (STATUS "WARNING: Could not find pkg-config; cannot search for firmataplus or related.")
ELSE (NOT PKG_CONFIG_FOUND)
pkg_check_modules(FIRMATAPLUS_PKG firmataplus)
IF (FIRMATAPLUS_PKG_FOUND)
SET(WITH_FIRMATAPLUS TRUE)
ENDIF (FIRMATAPLUS_PKG_FOUND)
ENDIF (NOT PKG_CONFIG_FOUND)
IF (WITH_FIRMATAPLUS)
PLAYER_ADD_PLUGIN_DRIVER (firmatastd
SOURCES firmatastd.cc
INCLUDEDIRS "${FIRMATAPLUS_PKG_INCLUDE_DIRS}"
LIBDIRS "${FIRMATAPLUS_PKG_LIB_DIRS}"
LINKFLAGS "${FIRMATAPLUS_PKG_LDFLAGS}"
CFLAGS "${FIRMATAPLUS_PKG_CFLAGS}")
ELSE (WITH_FIRMATAPLUS)
MESSAGE (STATUS "firmatastd will not be built - firmataplus not found")
MESSAGE (STATUS "firmataplus can be found at http://sourceforge.net/projects/firmataplus")
ENDIF (WITH_FIRMATAPLUS)
svn diff against revision 8259
The changes have been made in SVN trunk.
Thank you for your contribution.