mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-13 10:22:55 +01:00
Merge pull request #630 from jschueller/appveyor
Fix shared/static lib build conflict resolves #631
This commit is contained in:
commit
f26edb05e5
35
appveyor.yml
35
appveyor.yml
@ -1,30 +1,17 @@
|
|||||||
# This is a comment.
|
|
||||||
|
|
||||||
version: build.{build}
|
|
||||||
|
|
||||||
os: Windows Server 2012 R2
|
|
||||||
|
|
||||||
clone_folder: c:\projects\jsoncpp
|
clone_folder: c:\projects\jsoncpp
|
||||||
|
|
||||||
platform:
|
environment:
|
||||||
- Win32
|
matrix:
|
||||||
- x64
|
- CMAKE_GENERATOR: Visual Studio 12 2013
|
||||||
|
- CMAKE_GENERATOR: Visual Studio 12 2013 Win64
|
||||||
|
- CMAKE_GENERATOR: Visual Studio 14 2015
|
||||||
|
- CMAKE_GENERATOR: Visual Studio 14 2015 Win64
|
||||||
|
|
||||||
configuration:
|
build_script:
|
||||||
- Debug
|
- cmake --version
|
||||||
- Release
|
- cd c:\projects\jsoncpp
|
||||||
|
- cmake -G "%CMAKE_GENERATOR%" -DCMAKE_INSTALL_PREFIX=%CD:\=/%/install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON .
|
||||||
# scripts to run before build
|
- cmake --build . --config Release --target install
|
||||||
before_build:
|
|
||||||
- echo "Running cmake..."
|
|
||||||
- cd c:\projects\jsoncpp
|
|
||||||
- cmake --version
|
|
||||||
- set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
|
|
||||||
- if %PLATFORM% == Win32 cmake .
|
|
||||||
- if %PLATFORM% == x64 cmake -G "Visual Studio 12 2013 Win64" .
|
|
||||||
|
|
||||||
build:
|
|
||||||
project: jsoncpp.sln # path to Visual Studio solution or project
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: GitHub
|
provider: GitHub
|
||||||
|
@ -95,8 +95,12 @@ ENDIF()
|
|||||||
IF(BUILD_STATIC_LIBS)
|
IF(BUILD_STATIC_LIBS)
|
||||||
ADD_LIBRARY(jsoncpp_lib_static STATIC ${PUBLIC_HEADERS} ${jsoncpp_sources})
|
ADD_LIBRARY(jsoncpp_lib_static STATIC ${PUBLIC_HEADERS} ${jsoncpp_sources})
|
||||||
SET_TARGET_PROPERTIES( jsoncpp_lib_static PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_SOVERSION})
|
SET_TARGET_PROPERTIES( jsoncpp_lib_static PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_SOVERSION})
|
||||||
SET_TARGET_PROPERTIES( jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp
|
# avoid name clashes on windows as the shared import lib is also named jsoncpp.lib
|
||||||
DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX} )
|
if (NOT DEFINED STATIC_SUFFIX AND BUILD_SHARED_LIBS)
|
||||||
|
set (STATIC_SUFFIX "_static")
|
||||||
|
endif ()
|
||||||
|
set_target_properties (jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp${STATIC_SUFFIX}
|
||||||
|
DEBUG_OUTPUT_NAME jsoncpp${STATIC_SUFFIX}${DEBUG_LIBNAME_SUFFIX})
|
||||||
|
|
||||||
INSTALL( TARGETS jsoncpp_lib_static ${INSTALL_EXPORT}
|
INSTALL( TARGETS jsoncpp_lib_static ${INSTALL_EXPORT}
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
Loading…
Reference in New Issue
Block a user