mirror of
https://github.com/cuberite/libevent.git
synced 2025-08-04 01:36:23 -04:00
cmake: set CMAKE_{RUNTIME,LIBRARY,ARCHIVE}_OUTPUT_DIRECTORY they are not defined
This will allow overriding them in parent cmake rules, i.e. if libevent is used via add_subdirectory(). Closes: #931 (cherry picked from commit 8f13c170cf6e9a02dec410b967884ec5e08947ab)
This commit is contained in:
parent
47eb8c1208
commit
2db851a980
@ -158,9 +158,18 @@ option(EVENT__COVERAGE
|
|||||||
|
|
||||||
# Put the libaries and binaries that get built into directories at the
|
# Put the libaries and binaries that get built into directories at the
|
||||||
# top of the build tree rather than in hard-to-find leaf directories.
|
# top of the build tree rather than in hard-to-find leaf directories.
|
||||||
|
#
|
||||||
|
# But only if this variables are not defined yet
|
||||||
|
# (i.e. libevent is used via add_subdirectory())
|
||||||
|
if (NOT DEFINED CMAKE_RUNTIME_OUTPUT_DIRECTORY)
|
||||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
||||||
|
endif()
|
||||||
|
if (NOT DEFINED CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
||||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
||||||
|
endif()
|
||||||
|
if (NOT DEFINED CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (EVENT__ENABLE_VERBOSE_DEBUG)
|
if (EVENT__ENABLE_VERBOSE_DEBUG)
|
||||||
add_definitions(-DUSE_DEBUG=1)
|
add_definitions(-DUSE_DEBUG=1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user