fix JSONCPP_WITH_CMAKE_PACKAGE #155

mv JSONCPP_WITH_CMAKE_PACKAGE ahead of INSTALL def.
This commit is contained in:
Christopher Dunn 2015-02-07 11:34:40 -06:00
parent fe855fb4dd
commit 636121485c

View File

@ -40,6 +40,13 @@ SET(jsoncpp_sources
json_writer.cpp
version.h.in)
# Install instructions for this target
IF(JSONCPP_WITH_CMAKE_PACKAGE)
SET(INSTALL_EXPORT EXPORT jsoncpp)
ELSE(JSONCPP_WITH_CMAKE_PACKAGE)
SET(INSTALL_EXPORT)
ENDIF(JSONCPP_WITH_CMAKE_PACKAGE)
IF(JSONCPP_LIB_BUILD_SHARED)
ADD_DEFINITIONS( -DJSON_DLL_BUILD )
ADD_LIBRARY(jsoncpp_lib SHARED ${PUBLIC_HEADERS} ${jsoncpp_sources})
@ -77,10 +84,3 @@ IF(JSONCPP_LIB_BUILD_STATIC)
ENDIF(NOT CMAKE_VERSION VERSION_LESS 2.8.11)
ENDIF()
# Install instructions for this target
IF(JSONCPP_WITH_CMAKE_PACKAGE)
SET(INSTALL_EXPORT EXPORT jsoncpp)
ELSE(JSONCPP_WITH_CMAKE_PACKAGE)
SET(INSTALL_EXPORT)
ENDIF(JSONCPP_WITH_CMAKE_PACKAGE)