mirror of https://github.com/xiph/flac
[CMake] Set binary and library output dir to objs on Windows
Without this patch, CMake places output binaries and libraries in the respective source directories, like the autotools build system. The Visual Studio build system places objects in the objs directory Because CTest didn't run properly when building shared libs, this commit changes the CMake behaviour on (NOT UNIX) to that similar to Visual Studio. That way, DLLs and EXEs are placed in the same directory and running CTest with the correct DLLs being loaded is trivial.
This commit is contained in:
parent
4256c12eac
commit
db72703f86
|
@ -27,6 +27,12 @@ option(BUILD_SHARED_LIBS "Build shared instead of static libraries" OFF)
|
|||
|
||||
set(VERSION ${PROJECT_VERSION})
|
||||
|
||||
if(NOT UNIX)
|
||||
# This is to make sure testing works when building with a DLL
|
||||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/objs)
|
||||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/objs)
|
||||
endif()
|
||||
|
||||
if(WITH_OGG)
|
||||
find_package(Ogg REQUIRED)
|
||||
set(OGG_PACKAGE "ogg")
|
||||
|
|
Loading…
Reference in New Issue