Skip to content

Commit

Permalink
Add dynamic linking support
Browse files Browse the repository at this point in the history
  • Loading branch information
andrejnau committed Jan 13, 2024
1 parent 08173f8 commit daeeb3f
Show file tree
Hide file tree
Showing 36 changed files with 323 additions and 1,594 deletions.
2 changes: 0 additions & 2 deletions cmake/3rdparty/vulkan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ elseif(APPLE)
INTERFACE_COMPILE_DEFINITIONS
VK_USE_PLATFORM_METAL_EXT
)
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
set(CMAKE_INSTALL_RPATH "/usr/local/lib")
elseif(NOT ANDROID)
set_property(TARGET vulkan APPEND PROPERTY
INTERFACE_COMPILE_DEFINITIONS
Expand Down
11 changes: 10 additions & 1 deletion cmake/cmake_settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,17 @@ endif()

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets")
option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)

if (APPLE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
if (VULKAN_SUPPORT)
set(CMAKE_INSTALL_RPATH "@executable_path;/usr/local/lib")
else()
set(CMAKE_INSTALL_RPATH "@executable_path")
endif()
endif()
2 changes: 1 addition & 1 deletion src/Apps/CoreDxrTriangle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ target_include_directories(${target}
target_link_libraries(${target}
AppBox
Utilities
Instance
FlyCube
FlyCubeAssets
)

Expand Down
2 changes: 1 addition & 1 deletion src/Apps/CoreTriangle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ endif()

target_link_libraries(CoreTriangle
AppBox
Instance
FlyCube
FlyCubeAssets
)

Expand Down
2 changes: 1 addition & 1 deletion src/Apps/CoreTriangleUIKit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ add_executable(CoreTriangleUIKit MACOSX_BUNDLE

target_link_libraries(CoreTriangleUIKit
AppBoxApple
Instance
FlyCube
)

if (CMAKE_SYSTEM_NAME STREQUAL "iOS")
Expand Down
59 changes: 0 additions & 59 deletions src/FlyCube/Adapter/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion src/FlyCube/ApiType/ApiType.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#include <stdint.h>
#include <cstdint>

enum class ApiType {
kVulkan,
Expand Down
6 changes: 0 additions & 6 deletions src/FlyCube/ApiType/CMakeLists.txt

This file was deleted.

61 changes: 0 additions & 61 deletions src/FlyCube/BindingSet/CMakeLists.txt

This file was deleted.

60 changes: 0 additions & 60 deletions src/FlyCube/BindingSetLayout/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit daeeb3f

Please sign in to comment.