I want to build the static library on a bin subdir, but cmake seems not not doing what I want.
Here is the Cmake file I wrote.
cmake_minimum_required(VERSION 3.3)
project(FancyLogger)
set(SOURCE_FILES FancyLogger.cpp)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
add_library(FancyLogger STATIC ${SOURCE_FILES})
I made a build subdir, and ran cmake .. and make in this sub directory, hoping that the output static library will be generated on the bin library.
But the output remains in the build directory, Why?
Here is my file tree
===== |
| FancyLogger.cpp
| CMakeLists.txt
| /build
| /bin
 
     
    