Simplified directory structure to make Visual Studio build work

This commit is contained in:
Daniel Wolf 2016-01-08 16:59:18 +01:00
parent 0f33fcfbd0
commit 2bfe671f82
3 changed files with 2 additions and 7 deletions

View File

@ -24,11 +24,6 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
add_compile_options(/MT$<$<CONFIG:Debug>:d>)
endif()
# Set output directories
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
# Define flags variables for later use
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(enableWarningsFlags "-Wall;-Wextra")

View File

@ -176,7 +176,7 @@ map<centiseconds, Phone> detectPhones(unique_ptr<AudioStream> audioStream, funct
try {
// Create PocketSphinx configuration
path sphinxModelDirectory(getBinDirectory().parent_path() / "res/sphinx");
path sphinxModelDirectory(getBinDirectory() / "res/sphinx");
auto config = createConfig(sphinxModelDirectory);
// Create phone recognizer

View File

@ -7,7 +7,7 @@ function(copy_after_build sourceGlob relativeTargetDirectory)
get_filename_component(fileName "${sourcePath}" NAME)
# Set `targetPath`
set(targetPath "${CMAKE_BINARY_DIR}/${relativeTargetDirectory}/${fileName}")
set(targetPath "$<TARGET_FILE_DIR:rhubarb>/${relativeTargetDirectory}/${fileName}")
add_custom_command(TARGET rhubarb POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "${sourcePath}" "${targetPath}"