added cmake option to build static and shared libraries at once

See #147 and #149.
This commit is contained in:
Peter Spiess-Knafl
2015-01-27 20:01:42 +00:00
committed by Christopher Dunn
parent 38042b3892
commit 5e8595c0e2
4 changed files with 58 additions and 31 deletions

View File

@@ -9,7 +9,12 @@ ADD_EXECUTABLE( jsoncpp_test
main.cpp
)
TARGET_LINK_LIBRARIES(jsoncpp_test jsoncpp_lib)
IF(JSONCPP_LIB_BUILD_SHARED)
TARGET_LINK_LIBRARIES(jsoncpp_test jsoncpp_lib)
ELSE(JSONCPP_LIB_BUILD_SHARED)
TARGET_LINK_LIBRARIES(jsoncpp_test jsoncpp_lib_static)
ENDIF(JSONCPP_LIB_BUILD_SHARED)
# another way to solve issue #90
#set_target_properties(jsoncpp_test PROPERTIES COMPILE_FLAGS -ffloat-store)