Skip to content

Commit 37c8c28

Browse files
Merge pull request #515 from compnerd/output-directory
build: place executable content into the root of the build
2 parents 3e149e9 + e47283c commit 37c8c28

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ set(CMAKE_CXX_STANDARD 11)
1919

2020
set(CMAKE_C_VISIBILITY_PRESET hidden)
2121

22+
# NOTE(compnerd) this is a horrible workaround for Windows to ensure that the
23+
# tests can run as there is no rpath equivalent and `PATH` is used to lookup the
24+
# libraries.
25+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
26+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
27+
2228
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
2329
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
2430
find_package(Threads REQUIRED)

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ if(ENABLE_SWIFT)
124124
module-maps
125125
DispatchStubs
126126
LINK_FLAGS
127+
-L $<TARGET_LINKER_FILE_DIR:DispatchStubs>
127128
-lDispatchStubs
128129
-L $<TARGET_LINKER_FILE_DIR:BlocksRuntime>
129130
-lBlocksRuntime

0 commit comments

Comments
 (0)