Skip to content

Commit

Permalink
Improved project management - dumping everything in build/bin
Browse files Browse the repository at this point in the history
  • Loading branch information
Epixu committed Nov 23, 2023
1 parent 3e79fce commit f067050
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ project(LangulusFractalloc

# Check if this project is built as standalone, or a part of something else
if(PROJECT_IS_TOP_LEVEL OR NOT LANGULUS)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/lib)

include(LangulusUtilities.cmake)

# Always enable the managed memory feature
Expand Down
10 changes: 0 additions & 10 deletions LangulusUtilities.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,4 @@ function(fetch_external_module NAME GIT_REPOSITORY REPO GIT_TAG TAG)
string(TOLOWER ${NAME} LOWERCASE_NAME)
set(${NAME}_SOURCE_DIR "${${LOWERCASE_NAME}_SOURCE_DIR}" CACHE INTERNAL "")
set(${NAME}_BINARY_DIR "${${LOWERCASE_NAME}_BINARY_DIR}" CACHE INTERNAL "")
endfunction()

function(langulus_copy_dlls TARGET ON THIS)
if(WIN32 AND LANGULUS_SHARED_LIBRARIES)
add_custom_command(
TARGET ${THIS} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_RUNTIME_DLLS:${TARGET}>" "$<TARGET_FILE_DIR:${TARGET}>"
COMMAND_EXPAND_LISTS
)
endif()
endfunction()
4 changes: 1 addition & 3 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ target_link_libraries(LangulusFractallocTest
add_test(
NAME LangulusFractallocTest
COMMAND LangulusFractallocTest
)

langulus_copy_dlls(LangulusFractallocTest ON LangulusFractallocTest)
)

0 comments on commit f067050

Please sign in to comment.