style directory structure. This may be useful for collecting the artifacts and
providing them to another project that is dependent on them.
-The default location is `$CMAKE_BINARY_DIR\install`, but can be changed with
-the `CMAKE_INSTALL_PREFIX` variable when first generating the project build
+The default location is `$CMAKE_CURRENT_BINARY_DIR\install`, but can be changed
+with the `CMAKE_INSTALL_PREFIX` variable when first generating the project build
files with CMake.
You can build the install target from the command line with:
# See the License for the specific language governing permissions and
# limitations under the License.
# ~~~
-
cmake_minimum_required(VERSION 3.10.2)
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# If we are building in Visual Studio 2015 and with a CMake version 3.19 or greater, we need to set this variable
# so that CMake will choose a Windows SDK version higher than 10.0.14393.0, as dxgi1_6.h is only found in Windows SDK
endif()
message("********************************************************************************")
- message("* NOTE: Adding target vl_update_deps to run as needed for updating *")
+ message("* NOTE: Adding target vl_update_deps to run as needed for updating *")
message("* dependencies. *")
message("********************************************************************************")
list(APPEND CMAKE_PREFIX_PATH ${VULKAN_HEADERS_INSTALL_DIR})
endif()
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(PythonInterp 3 QUIET)
set(THREADS_PREFER_PTHREAD_FLAG ON)
include(GNUInstallDirs)
if(UNIX AND NOT APPLE) # i.e.: Linux
- include(FindPkgConfig)
-endif()
-
-if(APPLE)
- # CMake versions 3 or later need CMAKE_MACOSX_RPATH defined. This avoids the CMP0042 policy message.
- set(CMAKE_MACOSX_RPATH 1)
+ find_package(PkgConfig)
endif()
set(GIT_BRANCH_NAME "--unknown--")
if(WIN32 AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# Windows: if install locations not set by user, set install prefix to "<build_dir>\install".
- set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "default install path" FORCE)
+ set(CMAKE_INSTALL_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/install" CACHE PATH "default install path" FORCE)
endif()
# Enable IDE GUI folders. "Helper targets" that don't have interesting source code should set their FOLDER property to this
endif()
if (BUILD_TESTS)
- add_subdirectory(tests ${CMAKE_BINARY_DIR}/tests)
+ add_subdirectory(tests)
endif()
endif()
target_compile_options(testing_framework_util PUBLIC /wd4458)
endif()
-include(CMakeParseArguments)
function(AddSharedLibrary LIBRARY_NAME)
set(singleValueArgs DEF_FILE)
set(multiValueArgs SOURCES DEFINITIONS)
add_library(testing_dependencies STATIC test_environment.cpp test_environment.h)
target_link_libraries(testing_dependencies
PUBLIC gtest Vulkan::Headers testing_framework_util shim-library)
-target_include_directories(testing_dependencies PUBLIC ${CMAKE_BINARY_DIR}/tests/framework)
+target_include_directories(testing_dependencies PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
target_compile_definitions(testing_dependencies PUBLIC "GTEST_LINKED_AS_SHARED_LIBRARY=1")
set_target_properties(testing_dependencies ${LOADER_STANDARD_CXX_PROPERTIES})
if (APPLE AND BUILD_STATIC_LOADER)