mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Remove workaround for slint DLL placement for examples
We can now use the standard CMake variables to make sure that a copy of the DLL lands next to the executables for Windows.
This commit is contained in:
parent
53b05c426c
commit
3e5aa212d5
2 changed files with 9 additions and 10 deletions
|
@ -14,17 +14,21 @@ option(BUILD_TESTING "Build tests" OFF)
|
|||
add_feature_info(BUILD_TESTING BUILD_TESTING "configure whether to build the test suite")
|
||||
include(CTest)
|
||||
|
||||
# Place all compiled examples into the same bin directory
|
||||
# on Windows, where we'll also put the dll
|
||||
if (WIN32)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/bin/debug)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/bin/release)
|
||||
endif()
|
||||
|
||||
add_subdirectory(api/cpp/)
|
||||
|
||||
option(SLINT_BUILD_EXAMPLES "Build Slint Examples" OFF)
|
||||
add_feature_info(SLINT_BUILD_EXAMPLES SLINT_BUILD_EXAMPLES "configure whether to build the examples")
|
||||
|
||||
if(SLINT_BUILD_EXAMPLES)
|
||||
# Place all compiled examples into the same bin directory
|
||||
# on Windows, where we'll also put the dll
|
||||
if (WIN32)
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
endif()
|
||||
add_subdirectory(examples)
|
||||
if(BUILD_TESTING)
|
||||
add_subdirectory(docs/tutorial/cpp/src/)
|
||||
|
|
|
@ -259,11 +259,6 @@ if(WIN32)
|
|||
if(GENERATOR_IS_MULTI_CONFIG)
|
||||
set(config_subdir_genex "$<CONFIG>/")
|
||||
endif()
|
||||
|
||||
add_custom_target(Slint_dll_convenience ALL DEPENDS slint-cpp-shared
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
$<TARGET_FILE:slint-cpp-shared>
|
||||
${CMAKE_BINARY_DIR}/bin/${config_subdir_genex}$<TARGET_FILE_NAME:slint-cpp-shared>)
|
||||
endif()
|
||||
|
||||
if(SLINT_FEATURE_COMPILER)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue