File tree Expand file tree Collapse file tree 2 files changed +18
-27
lines changed Expand file tree Collapse file tree 2 files changed +18
-27
lines changed Original file line number Diff line number Diff line change 1
- # This is a comment.
2
-
3
- version : build.{build}
4
-
5
- os : Windows Server 2012 R2
6
-
7
1
clone_folder : c:\projects\jsoncpp
8
2
9
- platform :
10
- - Win32
11
- - x64
12
-
13
- configuration :
14
- - Debug
15
- - Release
16
-
17
- # scripts to run before build
18
- before_build :
19
- - echo "Running cmake..."
20
- - cd c:\projects\jsoncpp
21
- - cmake --version
22
- - set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
23
- - if %PLATFORM% == Win32 cmake .
24
- - if %PLATFORM% == x64 cmake -G "Visual Studio 12 2013 Win64" .
25
-
26
- build :
27
- project : jsoncpp.sln # path to Visual Studio solution or project
3
+ environment :
4
+ matrix :
5
+ - CMAKE_GENERATOR : Visual Studio 12 2013
6
+ - CMAKE_GENERATOR : Visual Studio 12 2013 Win64
7
+ - CMAKE_GENERATOR : Visual Studio 14 2015
8
+ - CMAKE_GENERATOR : Visual Studio 14 2015 Win64
9
+
10
+ build_script :
11
+ - cmake --version
12
+ - cd c:\projects\jsoncpp
13
+ - cmake -G "%CMAKE_GENERATOR%" -DCMAKE_INSTALL_PREFIX=%CD:\=/%/install -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON .
14
+ - cmake --build . --config Release --target install
28
15
29
16
deploy :
30
17
provider : GitHub
Original file line number Diff line number Diff line change @@ -95,8 +95,12 @@ ENDIF()
95
95
IF (BUILD_STATIC_LIBS )
96
96
ADD_LIBRARY (jsoncpp_lib_static STATIC ${PUBLIC_HEADERS} ${jsoncpp_sources} )
97
97
SET_TARGET_PROPERTIES ( jsoncpp_lib_static PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_SOVERSION} )
98
- SET_TARGET_PROPERTIES ( jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp
99
- DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX} )
98
+ # avoid name clashes on windows as the shared import lib is also named jsoncpp.lib
99
+ if (NOT DEFINED STATIC_SUFFIX AND BUILD_SHARED_LIBS )
100
+ set (STATIC_SUFFIX "_static" )
101
+ endif ()
102
+ set_target_properties (jsoncpp_lib_static PROPERTIES OUTPUT_NAME jsoncpp${STATIC_SUFFIX}
103
+ DEBUG_OUTPUT_NAME jsoncpp${STATIC_SUFFIX}${DEBUG_LIBNAME_SUFFIX} )
100
104
101
105
INSTALL ( TARGETS jsoncpp_lib_static ${INSTALL_EXPORT}
102
106
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
You can’t perform that action at this time.
0 commit comments