Skip to content

Commit

Permalink
Add BUILD_UI cmake option + cmake cleanup
Browse files Browse the repository at this point in the history
`cmake -DBUILD_UI=ON -DBUILD_CLIENT=OFF` only builds the qt ui
  • Loading branch information
ChristopherHX committed Jun 9, 2022
1 parent 75ec84c commit 21b959e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
32 changes: 17 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ endfunction()
git_commit_hash(${CMAKE_SOURCE_DIR} MANIFEST_GIT_COMMIT_HASH)

option(BUILD_CLIENT "Enables building of the client launcher." ON)
option(BUILD_UI "Enables building of the client ui requires qt." ON)
option(BUILD_TESTING "Build tests for cll-telemetry (requires GTest)" OFF)

if (APPLE)
Expand All @@ -79,7 +80,7 @@ endif()
include(ext/json.cmake)

option(USE_GAMECONTROLLERDB "Downloads gamecontrollerdb.txt from gabomdq/SDL_GameControllerDB" ON)
if (USE_GAMECONTROLLERDB)
if (USE_GAMECONTROLLERDB AND BUILD_CLIENT)
include(ext/gamepad_mappings.cmake)
endif()

Expand All @@ -94,7 +95,7 @@ if (BUILD_CLIENT)
endif()

option(BUILD_WEBVIEW "Build webview for xboxlive login" ON)
if (BUILD_WEBVIEW)
if (BUILD_WEBVIEW AND BUILD_UI)
add_subdirectory(mcpelauncher-webview)
endif()

Expand All @@ -103,16 +104,15 @@ if (APPLE)
add_subdirectory(epoll-shim)
endif()

add_subdirectory(logger)
add_subdirectory(base64)
add_subdirectory(file-util)
add_subdirectory(properties-parser)
add_subdirectory(arg-parser)

add_subdirectory(mcpelauncher-linker)
add_subdirectory(libc-shim)

if (BUILD_CLIENT)
add_subdirectory(logger)
add_subdirectory(base64)
add_subdirectory(file-util)
add_subdirectory(properties-parser)
add_subdirectory(arg-parser)

add_subdirectory(mcpelauncher-linker)
add_subdirectory(libc-shim)
# MSA is only required with the client
add_subdirectory(simple-ipc)
add_subdirectory(daemon-utils/client)
Expand All @@ -122,11 +122,11 @@ if (BUILD_CLIENT)
add_subdirectory(game-window)

add_subdirectory(cll-telemetry)
endif()

add_subdirectory(minecraft-imported-symbols)
add_subdirectory(mcpelauncher-common)
add_subdirectory(mcpelauncher-core)
add_subdirectory(minecraft-imported-symbols)
add_subdirectory(mcpelauncher-common)
add_subdirectory(mcpelauncher-core)
endif()

option(JNI_USE_JNIVM "if off it uses fake-jni + baron or it uses jnivm instead as jni interface" ON)
if (BUILD_CLIENT)
Expand All @@ -140,6 +140,8 @@ if (BUILD_CLIENT)
add_subdirectory(baron)
endif()
add_subdirectory(mcpelauncher-client)
endif()
if (BUILD_CLIENT OR BUILD_UI)
add_subdirectory(mcpelauncher-errorwindow)
endif()

Expand Down
2 changes: 1 addition & 1 deletion mcpelauncher-errorwindow

0 comments on commit 21b959e

Please sign in to comment.