mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Change name of internal CMake custom target
It shows up when using libloot as a FetchContent dependency, and it's a bit confusing to have libloot and libloot-cpp-build when the latter isn't the one that a C++ project should really depend on. libloot-cargo may still be confusing, but at least indicates what is involved.
This commit is contained in:
+6
-6
@@ -46,7 +46,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang
|
||||
set(CARGO_COMMAND ${CMAKE_COMMAND} -E env --modify "CXXFLAGS=string_append: -fno-lto" -- ${CARGO_COMMAND})
|
||||
endif()
|
||||
|
||||
add_custom_target(libloot-cpp-build
|
||||
add_custom_target(libloot_cargo
|
||||
# Force LTO to be disabled when building the first layer of the C++ wrapper,
|
||||
# as it may be enabled by default, and if so that leads to undefined symbols
|
||||
# in the C++ wrapper's shared library. It's not enough to just pass -fno-lto
|
||||
@@ -61,13 +61,13 @@ add_custom_target(libloot-cpp-build
|
||||
"${TARGET_PATH}/cxxbridge/rust/cxx.h"
|
||||
)
|
||||
|
||||
add_library(libloot-cpp INTERFACE)
|
||||
add_dependencies(libloot-cpp libloot-cpp-build)
|
||||
add_library(libloot_cpp INTERFACE)
|
||||
add_dependencies(libloot_cpp libloot_cargo)
|
||||
|
||||
target_link_libraries(libloot-cpp INTERFACE
|
||||
target_link_libraries(libloot_cpp INTERFACE
|
||||
optimized "${TARGET_PATH}/release/${LIBLOOT_CPP_FILENAME}"
|
||||
debug "${TARGET_PATH}/debug/${LIBLOOT_CPP_FILENAME}")
|
||||
target_include_directories(libloot-cpp INTERFACE "${TARGET_PATH}/cxxbridge")
|
||||
target_include_directories(libloot_cpp INTERFACE "${TARGET_PATH}/cxxbridge")
|
||||
|
||||
|
||||
##############################
|
||||
@@ -156,7 +156,7 @@ endif()
|
||||
|
||||
# Build API.
|
||||
add_library(libloot ${LIBLOOT_LIBRARY_TYPE} ${LIBLOOT_ALL_SOURCES})
|
||||
target_link_libraries(libloot PRIVATE libloot-cpp)
|
||||
target_link_libraries(libloot PRIVATE libloot_cpp)
|
||||
|
||||
##############################
|
||||
# Set Target-Specific Flags
|
||||
|
||||
Reference in New Issue
Block a user