mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
add basic cmake support
This commit is contained in:
committed by
Eugene Shalygin
parent
654c8edc6b
commit
64daecb266
35
src/webui/CMakeLists.txt
Normal file
35
src/webui/CMakeLists.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
set(QBT_WEBUI_HEADERS
|
||||
abstractwebapplication.h
|
||||
btjson.h
|
||||
extra_translations.h
|
||||
jsonutils.h
|
||||
prefjson.h
|
||||
webapplication.h
|
||||
websessiondata.h
|
||||
webui.h
|
||||
)
|
||||
|
||||
set(QBT_WEBUI_SOURCES
|
||||
abstractwebapplication.cpp
|
||||
btjson.cpp
|
||||
prefjson.cpp
|
||||
webapplication.cpp
|
||||
webui.cpp
|
||||
)
|
||||
|
||||
if (QT4_FOUND)
|
||||
if (NOT SYSTEM_QJSON)
|
||||
add_subdirectory(qjson)
|
||||
else (NOT SYSTEM_QJSON)
|
||||
find_package(QJSON REQUIRED)
|
||||
add_definitions(-DUSE_SYSTEM_QJSON)
|
||||
endif(NOT SYSTEM_QJSON)
|
||||
endif (QT4_FOUND)
|
||||
|
||||
set(QBT_WEBUI_RESOURCES webui.qrc)
|
||||
add_library(qbt_webui STATIC ${QBT_WEBUI_HEADERS} ${QBT_WEBUI_SOURCES} ${QBT_WEBUI_RESOURCES})
|
||||
target_link_libraries(qbt_webui qbt_base)
|
||||
|
||||
if (QT4_FOUND)
|
||||
target_link_libraries(qbt_webui qjson)
|
||||
endif (QT4_FOUND)
|
||||
25
src/webui/qjson/CMakeLists.txt
Normal file
25
src/webui/qjson/CMakeLists.txt
Normal file
@@ -0,0 +1,25 @@
|
||||
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(QJSON_HEADERS
|
||||
FlexLexer.h
|
||||
stack.hh
|
||||
position.hh
|
||||
location.hh
|
||||
json_parser.hh
|
||||
json_scanner.h
|
||||
parser.h
|
||||
parser_p.h
|
||||
qjson_debug.h
|
||||
qjson_export.h
|
||||
serializer.h
|
||||
)
|
||||
|
||||
set(QJSON_SOURCES
|
||||
json_parser.cc
|
||||
json_scanner.cc
|
||||
json_scanner.cpp
|
||||
parser.cpp
|
||||
serializer.cpp
|
||||
)
|
||||
|
||||
add_library(qjson STATIC ${QJSON_HEADERS} ${QJSON_SOURCES})
|
||||
|
||||
Reference in New Issue
Block a user