Skip to content

Commit

Permalink
Merge c829c73 into 5be07bd
Browse files Browse the repository at this point in the history
  • Loading branch information
dota17 committed Sep 2, 2020
2 parents 5be07bd + c829c73 commit b65295b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/jsontestrunner/CMakeLists.txt
Expand Up @@ -19,10 +19,8 @@ if(BUILD_SHARED_LIBS)
else()
add_definitions(-DJSON_DLL)
endif()
target_link_libraries(jsontestrunner_exe jsoncpp_lib)
else()
target_link_libraries(jsontestrunner_exe jsoncpp_static)
endif()
target_link_libraries(jsontestrunner_exe jsoncpp_lib)

set_target_properties(jsontestrunner_exe PROPERTIES OUTPUT_NAME jsontestrunner_exe)

Expand Down
8 changes: 6 additions & 2 deletions src/lib_json/CMakeLists.txt
Expand Up @@ -151,7 +151,11 @@ if(BUILD_SHARED_LIBS)
endif()

if(BUILD_STATIC_LIBS)
set(STATIC_LIB ${PROJECT_NAME}_static)
if (BUILD_SHARED_LIBS)
set(STATIC_LIB ${PROJECT_NAME}_static)
else()
set(STATIC_LIB ${PROJECT_NAME}_lib)
endif()
add_library(${STATIC_LIB} STATIC ${PUBLIC_HEADERS} ${JSONCPP_SOURCES})

# avoid name clashes on windows as the shared import lib is alse named jsoncpp.lib
Expand All @@ -160,7 +164,7 @@ if(BUILD_STATIC_LIBS)
endif()

set_target_properties(${STATIC_LIB} PROPERTIES
OUTPUT_NAME jsoncpp${STATIC_SUFFIX}
OUTPUT_NAME jsoncpp
VERSION ${PROJECT_VERSION}
)

Expand Down
4 changes: 1 addition & 3 deletions src/test_lib_json/CMakeLists.txt
Expand Up @@ -15,10 +15,8 @@ if(BUILD_SHARED_LIBS)
else()
add_definitions( -DJSON_DLL )
endif()
target_link_libraries(jsoncpp_test jsoncpp_lib)
else()
target_link_libraries(jsoncpp_test jsoncpp_static)
endif()
target_link_libraries(jsoncpp_test jsoncpp_lib)

# another way to solve issue #90
#set_target_properties(jsoncpp_test PROPERTIES COMPILE_FLAGS -ffloat-store)
Expand Down

0 comments on commit b65295b

Please sign in to comment.