From fde3f2b5e0184722a05da405facb8a92639f6212 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Wed, 18 Jul 2018 14:03:36 +0200 Subject: [PATCH] Rename NXT -> Dawn in the rest of CMakeLists --- CMakeLists.txt | 16 ++++++++-------- examples/CMakeLists.txt | 4 ++-- generator/CMakeLists.txt | 2 +- src/backend/CMakeLists.txt | 2 +- src/common/CMakeLists.txt | 2 +- src/tests/CMakeLists.txt | 6 +++--- src/utils/CMakeLists.txt | 2 +- src/wire/CMakeLists.txt | 2 +- third_party/CMakeLists.txt | 8 ++++---- 9 files changed, 22 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b45054393c..76076d4256 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,7 +92,7 @@ if (WIN32) list(APPEND DAWN_DEFS "NOMINMAX") # Avoid Windows.h including a lot of headers list(APPEND DAWN_DEFS "WIN32_LEAN_AND_MEAN") - # Remove compile error where the mock NXT creates too many sections for the old obj format. + # Remove compile error where the mock Dawn creates too many sections for the old obj format. list(APPEND DAWN_FLAGS "/bigobj") endif() @@ -100,7 +100,7 @@ if (MSVC) list(APPEND DAWN_FLAGS "/std:c++14") list(APPEND DAWN_FLAGS "/EHsc") list(APPEND DAWN_INTERNAL_FLAGS "/W4") - # Allow declarations hiding members as it is used all over NXT + # Allow declarations hiding members as it is used all over Dawn list(APPEND DAWN_INTERNAL_FLAGS "/wd4458") list(APPEND DAWN_INTERNAL_FLAGS "/wd4996") # Allow deprecated functions like strncpy @@ -141,14 +141,14 @@ else() endif() endif() -function(NXTExternalTarget folder target) +function(DawnExternalTarget folder target) set_property(TARGET ${target} APPEND PROPERTY COMPILE_OPTIONS ${DAWN_FLAGS}) set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${DAWN_DEFS}) set_property(TARGET ${target} PROPERTY FOLDER "dawn/${folder}") endfunction() -function(NXTInternalTarget folder target) - NXTExternalTarget("${folder}" ${target}) +function(DawnInternalTarget folder target) + DawnExternalTarget("${folder}" ${target}) set_property(TARGET ${target} APPEND PROPERTY COMPILE_OPTIONS ${DAWN_INTERNAL_FLAGS}) set_property(TARGET ${target} APPEND PROPERTY COMPILE_DEFINITIONS ${DAWN_INTERNAL_DEFS}) @@ -174,7 +174,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) ################################################################################ -# Generate the C and C++ NXT APIs +# Generate the C and C++ Dawn APIs ################################################################################ set(INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/include) @@ -185,7 +185,7 @@ add_subdirectory(generator) Generate( LIB_NAME dawn LIB_TYPE STATIC - PRINT_NAME libNXT + PRINT_NAME libDawn COMMAND_LINE_ARGS ${GENERATOR_COMMON_ARGS} -T dawn @@ -195,7 +195,7 @@ target_include_directories(dawn PUBLIC ${GENERATED_DIR}) Generate( LIB_NAME dawncpp LIB_TYPE STATIC - PRINT_NAME libNXT++ + PRINT_NAME libDawn++ COMMAND_LINE_ARGS ${GENERATOR_COMMON_ARGS} -T dawncpp diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index dca7f2e443..1429386be7 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -17,14 +17,14 @@ add_library(sample_utils SampleUtils.h ) target_link_libraries(sample_utils utils dawn_wire) -NXTInternalTarget("examples" sample_utils) +DawnInternalTarget("examples" sample_utils) function(add_dawn_sample target sources) add_executable(${target} ${sources}) target_link_libraries(${target} sample_utils) target_include_directories(${target} SYSTEM PRIVATE ${GLM_INCLUDE_DIR}) target_include_directories(${target} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) - NXTInternalTarget("examples" ${target}) + DawnInternalTarget("examples" ${target}) # Suppress some warnings in our sample dependencies if (MSVC) diff --git a/generator/CMakeLists.txt b/generator/CMakeLists.txt index 75d172c71d..5c1867c7b2 100644 --- a/generator/CMakeLists.txt +++ b/generator/CMakeLists.txt @@ -61,7 +61,7 @@ function(Generate) ${OUTPUTS} ) - NXTInternalTarget("${G_FOLDER}" ${G_LIB_NAME}) + DawnInternalTarget("${G_FOLDER}" ${G_LIB_NAME}) set_property(TARGET ${G_LIB_NAME} APPEND PROPERTY COMPILE_OPTIONS ${DAWN_GENERATED_FLAGS}) endfunction() diff --git a/src/backend/CMakeLists.txt b/src/backend/CMakeLists.txt index 7f62013f3f..195711cebf 100644 --- a/src/backend/CMakeLists.txt +++ b/src/backend/CMakeLists.txt @@ -389,7 +389,7 @@ list(APPEND BACKEND_SOURCES ) add_library(dawn_backend STATIC ${BACKEND_SOURCES}) -NXTInternalTarget("backend" dawn_backend) +DawnInternalTarget("backend" dawn_backend) target_link_libraries(dawn_backend dawn_common glfw glad spirv_cross) if (DAWN_ENABLE_D3D12) diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 1db5e9ee35..8c94f61171 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -35,4 +35,4 @@ list(APPEND COMMON_SOURCES add_library(dawn_common STATIC ${COMMON_SOURCES}) target_include_directories(dawn_common PUBLIC ${SRC_DIR}) -NXTInternalTarget("" dawn_common) +DawnInternalTarget("" dawn_common) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index f2a2a2f89c..6a4dfdd04e 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -16,7 +16,7 @@ Generate( LIB_NAME mock_dawn LIB_TYPE STATIC FOLDER "tests" - PRINT_NAME libMockNXT + PRINT_NAME libMockDawn COMMAND_LINE_ARGS ${GENERATOR_COMMON_ARGS} -T mock_dawn @@ -68,7 +68,7 @@ endif() add_executable(dawn_unittests ${UNITTEST_SOURCES}) target_link_libraries(dawn_unittests dawn_common gtest dawn_backend mock_dawn dawn_wire utils) -NXTInternalTarget("tests" dawn_unittests) +DawnInternalTarget("tests" dawn_unittests) add_executable(dawn_end2end_tests ${END2END_TESTS_DIR}/BasicTests.cpp @@ -91,4 +91,4 @@ add_executable(dawn_end2end_tests ${TESTS_DIR}/NXTTest.h ) target_link_libraries(dawn_end2end_tests dawn_common dawn_wire gtest utils) -NXTInternalTarget("tests" dawn_end2end_tests) +DawnInternalTarget("tests" dawn_end2end_tests) diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 9da24dee74..46f846b011 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -56,7 +56,7 @@ endif() add_library(utils STATIC ${UTILS_SOURCES}) target_link_libraries(utils dawn_backend shaderc_shared dawncpp dawn) target_include_directories(utils PUBLIC ${SRC_DIR}) -NXTInternalTarget("" utils) +DawnInternalTarget("" utils) if(NOT MSVC) # allow C-style casts -- for shaderc set_property(TARGET utils APPEND PROPERTY COMPILE_OPTIONS "-Wno-old-style-cast") diff --git a/src/wire/CMakeLists.txt b/src/wire/CMakeLists.txt index b5fe49e7f7..497ce2caab 100644 --- a/src/wire/CMakeLists.txt +++ b/src/wire/CMakeLists.txt @@ -37,4 +37,4 @@ add_library(dawn_wire STATIC ${WIRE_DIR}/Wire.h ) target_link_libraries(dawn_wire wire_autogen) -NXTInternalTarget("wire" dawn_wire) +DawnInternalTarget("wire" dawn_wire) diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index 0afa739df2..1eae71562d 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -18,7 +18,7 @@ set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE) set(GLFW_INSTALL OFF CACHE BOOL "" FORCE) add_subdirectory(glfw) -NXTExternalTarget("third_party" glfw) +DawnExternalTarget("third_party" glfw) # GoogleTest set(GTEST_DIR ${CMAKE_CURRENT_SOURCE_DIR}/googletest/googletest) @@ -28,7 +28,7 @@ target_include_directories(gtest SYSTEM PUBLIC ${GTEST_DIR}/include ${GMOCK_DIR} target_include_directories(gtest SYSTEM PRIVATE ${GTEST_DIR} ${GMOCK_DIR}) find_package(Threads) target_link_libraries(gtest ${CMAKE_THREAD_LIBS_INIT}) -NXTExternalTarget("third_party" gtest) +DawnExternalTarget("third_party" gtest) # Glad add_library(glad STATIC @@ -37,7 +37,7 @@ add_library(glad STATIC ${CMAKE_CURRENT_SOURCE_DIR}/glad/include/KHR/khrplatform.h ) target_include_directories(glad SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/glad/include) -NXTExternalTarget("third_party" glad) +DawnExternalTarget("third_party" glad) # ShaderC # Prevent SPIRV-Tools from using Werror as it has a warning on MSVC @@ -130,7 +130,7 @@ endif() add_library(spirv_cross STATIC ${SPIRV_CROSS_SOURCES}) target_include_directories(spirv_cross SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -NXTExternalTarget("third_party" spirv_cross) +DawnExternalTarget("third_party" spirv_cross) # STB, used for stb_image set(STB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/stb PARENT_SCOPE)