Files
itgmania212121/extern/CMakeProject-json.cmake
T
Naftuli Tzvi Kay aa0e8690b7 Compile dependencies statically into the binary.
On Linux when building this under RPM, RPM insisted on linking in
standard system libraries like libpng, libjpeg-turbo, libGLEW,
Lua, etc. This patch causes all dependencies to be statically
compiled into the binary, which is ideal as the alternative is
segfaulting because of incompatible library changes.

StepMania also uses a modified Lua library which exports functions
that don't exist in any standard Lua library, so there's no easy
way around this.
2016-02-12 12:07:38 -08:00

31 lines
763 B
CMake

list(APPEND JSON_SRC
"jsoncpp/src/lib_json/json_reader.cpp"
"jsoncpp/src/lib_json/json_value.cpp"
"jsoncpp/src/lib_json/json_writer.cpp"
)
list(APPEND JSON_HPP
"jsoncpp/include/json/config.h"
"jsoncpp/include/json/features.h"
"jsoncpp/include/json/forwards.h"
"jsoncpp/include/json/json.h"
"jsoncpp/include/json/reader.h"
"jsoncpp/include/json/value.h"
"jsoncpp/include/json/writer.h"
)
source_group("" FILES ${JSON_SRC} ${JSON_HPP})
add_library("jsoncpp" STATIC ${JSON_SRC} ${JSON_HPP})
set_property(TARGET "jsoncpp" PROPERTY FOLDER "External Libraries")
if(MSVC)
sm_add_compile_definition("jsoncpp" _CRT_SECURE_NO_WARNINGS)
endif()
disable_project_warnings("jsoncpp")
target_include_directories("jsoncpp" PUBLIC "jsoncpp/include")