Get FindOpenGLInterface to use ly_add_external_target() instead
This commit is contained in:
@@ -116,10 +116,6 @@ function(ly_add_external_target)
|
||||
# Setting BASE_PATH variable in the parent scope to allow for the Find<3rdParty>.cmake scripts to use them
|
||||
set(BASE_PATH ${BASE_PATH} PARENT_SCOPE)
|
||||
|
||||
if(NOT EXISTS ${BASE_PATH})
|
||||
message(FATAL_ERROR "Cannot find 3rdParty library ${ly_add_external_target_NAME} on path ${BASE_PATH}")
|
||||
endif()
|
||||
|
||||
add_library(3rdParty::${NAME_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
|
||||
|
||||
if(ly_add_external_target_INCLUDE_DIRECTORIES)
|
||||
|
||||
+7
-7
@@ -9,11 +9,11 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
|
||||
find_package(OpenGL QUIET REQUIRED)
|
||||
# Imported targets (like OpenGL::GL) are scoped to a directory. Add a
|
||||
# a global scope
|
||||
add_library(3rdParty::OpenGLInterface INTERFACE IMPORTED GLOBAL)
|
||||
target_link_libraries(3rdParty::OpenGLInterface INTERFACE OpenGL::GL)
|
||||
find_package(OpenGL)
|
||||
|
||||
set(pal_file ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}/OpenGLInterface_${PAL_PLATFORM_NAME_LOWERCASE}.cmake)
|
||||
include(${pal_file})
|
||||
ly_add_external_target(
|
||||
NAME OpenGLInterface
|
||||
VERSION ""
|
||||
BUILD_DEPENDENCIES
|
||||
OpenGL::GL
|
||||
)
|
||||
@@ -1,10 +0,0 @@
|
||||
#
|
||||
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
# its licensors.
|
||||
#
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this
|
||||
# distribution (the "License"). All use of this software is governed by the License,
|
||||
# or, if provided, by the license below or the license accompanying this file. Do not
|
||||
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
@@ -16,7 +16,6 @@ set(FILES
|
||||
Clang_linux.cmake
|
||||
dyad_linux.cmake
|
||||
FbxSdk_linux.cmake
|
||||
OpenGLInterface_linux.cmake
|
||||
OpenSSL_linux.cmake
|
||||
Wwise_linux.cmake
|
||||
)
|
||||
|
||||
+2
-5
@@ -9,8 +9,5 @@
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
|
||||
target_compile_definitions(3rdParty::OpenGLInterface
|
||||
INTERFACE
|
||||
# MacOS 10.14 deprecates OpenGL. This silences the warnings for now.
|
||||
GL_SILENCE_DEPRECATION
|
||||
)
|
||||
# MacOS 10.14 deprecates OpenGL. This silences the warnings for now.
|
||||
set(OPENGLINTERFACE_COMPILE_DEFINITIONS GL_SILENCE_DEPRECATION)
|
||||
@@ -1,10 +0,0 @@
|
||||
#
|
||||
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
# its licensors.
|
||||
#
|
||||
# For complete copyright and license terms please see the LICENSE at the root of this
|
||||
# distribution (the "License"). All use of this software is governed by the License,
|
||||
# or, if provided, by the license below or the license accompanying this file. Do not
|
||||
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
#
|
||||
@@ -18,7 +18,6 @@ set(FILES
|
||||
dyad_windows.cmake
|
||||
FbxSdk_windows.cmake
|
||||
libav_windows.cmake
|
||||
OpenGLInterface_windows.cmake
|
||||
OpenSSL_windows.cmake
|
||||
Wwise_windows.cmake
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user