@@ -13,12 +13,12 @@ include(SetupCompiler)
1313#-------------------------------------------------------------------
1414
1515option (BUILD_SHARED_LIBS "Build shared libraries" OFF )
16- option (TT_BUILD_EXAMPLES "Build example applications" ON )
17- option (TT_BUILD_TESTS "Build tests" ON )
18- option (TT_BUILD_PCH "Build precompiled headers" ON )
19- option (TT_INSTALL "Generate installation target" ON )
20- option (TT_ENABLE_ANALYSIS "Compile using -analyze" OFF )
21- option (TT_ENABLE_ASAN "Compile using address sanitizer" OFF )
16+ option (HI_BUILD_EXAMPLES "Build example applications" ON )
17+ option (HI_BUILD_TESTS "Build tests" ON )
18+ option (HI_BUILD_PCH "Build precompiled headers" ON )
19+ option (HI_INSTALL "Generate installation target" ON )
20+ option (HI_ENABLE_ANALYSIS "Compile using -analyze" OFF )
21+ option (HI_ENABLE_ASAN "Compile using address sanitizer" OFF )
2222
2323#-------------------------------------------------------------------
2424# Project
@@ -32,38 +32,38 @@ endif()
3232
3333# vcpkg.json is the primary source for version data
3434file (READ ${CMAKE_SOURCE_DIR} /vcpkg.json VCPKG_JSON_STRING)
35- string (JSON TT_LIB_NAME GET ${VCPKG_JSON_STRING} "name" )
36- string (JSON TT_LIB_VERSION GET ${VCPKG_JSON_STRING} "version" )
37- string (JSON TT_LIB_LICENSE GET ${VCPKG_JSON_STRING} "license" )
38- string (JSON TT_LIB_DESC GET ${VCPKG_JSON_STRING} "description" )
39- string (JSON TT_LIB_HOMEPAGE GET ${VCPKG_JSON_STRING} "homepage" )
35+ string (JSON HI_LIB_NAME GET ${VCPKG_JSON_STRING} "name" )
36+ string (JSON HI_LIB_VERSION GET ${VCPKG_JSON_STRING} "version" )
37+ string (JSON HI_LIB_LICENSE GET ${VCPKG_JSON_STRING} "license" )
38+ string (JSON HI_LIB_DESC GET ${VCPKG_JSON_STRING} "description" )
39+ string (JSON HI_LIB_HOMEPAGE GET ${VCPKG_JSON_STRING} "homepage" )
4040
4141configure_file ("package.json.in" "package.json" @ONLY)
4242file (READ ${CMAKE_CURRENT_BINARY_DIR} /package.json PACKAGE_JSON_STRING)
43- string (JSON TT_LIB_DISPLAY_NAME GET ${PACKAGE_JSON_STRING} "display-name" )
44- string (JSON TT_LIB_VENDOR GET ${PACKAGE_JSON_STRING} "vendor" )
43+ string (JSON HI_LIB_DISPLAY_NAME GET ${PACKAGE_JSON_STRING} "display-name" )
44+ string (JSON HI_LIB_VENDOR GET ${PACKAGE_JSON_STRING} "vendor" )
4545
46- project (${TT_LIB_NAME } VERSION ${TT_LIB_VERSION } LANGUAGES ${LANGUAGES} )
46+ project (${HI_LIB_NAME } VERSION ${HI_LIB_VERSION } LANGUAGES ${LANGUAGES} )
4747
4848#-------------------------------------------------------------------
4949# Define Constants
5050#-------------------------------------------------------------------
5151
52- set (TT_WIN32 0)
53- set (TT_MACOS 0)
54- set (TT_POSIX 0)
55- set (TT_X64 0)
52+ set (HI_WIN32 0)
53+ set (HI_MACOS 0)
54+ set (HI_POSIX 0)
55+ set (HI_X64 0)
5656
5757if (APPLE )
58- set (TT_MACOS 1)
59- set (TT_POSIX 1)
58+ set (HI_MACOS 1)
59+ set (HI_POSIX 1)
6060elseif (WIN32 )
61- set (TT_WIN32 1)
61+ set (HI_WIN32 1)
6262endif ()
6363
6464set (x64_list x86 X86 amd64 AMD64)
6565if (${CMAKE_SYSTEM_PROCESSOR} IN_LIST x64_list)
66- set (TT_X64 1)
66+ set (HI_X64 1)
6767endif ()
6868
6969#-------------------------------------------------------------------
@@ -98,7 +98,7 @@ endif()
9898#
9999# GoogleTest - non-vcpkg, directly build from externals
100100#
101- if (TT_BUILD_TESTS )
101+ if (HI_BUILD_TESTS )
102102 set (INSTALL_GTEST OFF CACHE INTERNAL "Don't install gtest" )
103103 set (BUILD_GMOCK OFF CACHE INTERNAL "Don't build gmock" )
104104 FetchContent_Declare(googletest GIT_REPOSITORY https://github.com/google/googletest.git GIT_TAG release-1.11.0)
@@ -139,7 +139,7 @@ endif()
139139add_library (hikogui)
140140add_library (hikogui::hikogui ALIAS hikogui)
141141
142- if (TT_BUILD_TESTS )
142+ if (HI_BUILD_TESTS )
143143 add_executable (hikogui_tests)
144144endif ()
145145
@@ -307,11 +307,11 @@ elseif (MSVC)
307307 target_compile_options (hikogui PUBLIC -JMC)
308308 endif ()
309309
310- if (TT_ENABLE_ASAN )
310+ if (HI_ENABLE_ASAN )
311311 target_compile_options (hikogui PUBLIC -fsanitize=address)
312312 endif ()
313313
314- if (TT_ENABLE_ANALYSIS )
314+ if (HI_ENABLE_ANALYSIS )
315315 target_compile_options (hikogui PUBLIC -analyze)
316316
317317 #target_compile_options(hikogui PUBLIC -analyze:ruleset ${CMAKE_CURRENT_SOURCE_DIR}/AllRules.ruleset)
@@ -445,16 +445,16 @@ install(FILES
445445# Build Target: hikogui_tests (executable)
446446#-------------------------------------------------------------------
447447
448- if (TT_BUILD_TESTS )
448+ if (HI_BUILD_TESTS )
449449
450450 enable_testing ()
451451
452452 target_link_libraries (hikogui_tests PRIVATE gtest_main hikogui)
453453
454454 target_include_directories (hikogui_tests PRIVATE ${CMAKE_CURRENT_BINARY_DIR} )
455455
456- if (TT_BUILD_PCH )
457- if (NOT TT_ENABLE_ANALYSIS )
456+ if (HI_BUILD_PCH )
457+ if (NOT HI_ENABLE_ANALYSIS )
458458 target_precompile_headers(hikogui_tests PRIVATE <gtest/gtest.h>)
459459 endif ()
460460 endif ()
@@ -476,7 +476,7 @@ endif()
476476#-------------------------------------------------------------------
477477# Installation Rules: hikogui_tests (executable)
478478#-------------------------------------------------------------------
479- if (TT_BUILD_TESTS )
479+ if (HI_BUILD_TESTS )
480480 install (TARGETS hikogui_tests DESTINATION tests)
481481 install (DIRECTORY tests/data/ DESTINATION tests)
482482 if (BUILD_SHARED_LIBS )
@@ -487,7 +487,7 @@ endif()
487487#-------------------------------------------------------------------
488488# Build examples
489489#-------------------------------------------------------------------
490- if (TT_BUILD_EXAMPLES )
490+ if (HI_BUILD_EXAMPLES )
491491 add_subdirectory (examples/hikogui_demo)
492492 add_subdirectory (examples/widgets)
493493 add_subdirectory (examples/custom_widgets)
@@ -500,11 +500,11 @@ endif()
500500
501501show_build_target_properties(hikogui)
502502
503- if (TT_BUILD_EXAMPLES )
503+ if (HI_BUILD_EXAMPLES )
504504 show_build_target_properties(hikogui_demo)
505505endif ()
506506
507- if (TT_BUILD_TESTS )
507+ if (HI_BUILD_TESTS )
508508 show_build_target_properties(hikogui_tests)
509509endif ()
510510
0 commit comments