Are you sure you have the variables set correctly? I've checked with this CMakeLists.txt file, and it works correctly:
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(test CXX)
ADD_LIBRARY(wtdbo SHARED test.cc)
SET(WTDBO_SOVERSION 1)
SET(VERSION_SERIES 1)
SET(VERSION_MAJOR 0)
SET(VERSION_MINOR 0)
SET_TARGET_PROPERTIES(
wtdbo
PROPERTIES
VERSION ${VERSION_SERIES}.${VERSION_MAJOR}.${VERSION_MINOR}
SOVERSION ${WTDBO_SOVERSION}
DEBUG_POSTFIX "d"
)
However, if I comment out the SET(WTDBO_SOVERSION 1)
line I get the same error message as you do. The help for set_target_properties
is as follows, so you are definitely doing the right thing:
Targets can have properties that
affect how they are built.
set_target_properties(target1 target2 ...
PROPERTIES prop1 value1
prop2 value2 ...)
Set properties on a target. The
syntax for the command is to list all
the files you want to change, and then
provide the values you want to set
next. You can use any prop value pair
you want and extract it later with the
GET_TARGET_PROPERTY
command.