On macOS I managed to build my own small SHARED library based on fmt
, while installing it with vcpkg
and building the project with cmake
.
Now on Windows I have:
CMakeLists.txt
cmake_minimum_required(VERSION 3.19.1)
set(CMAKE_TOOLCHAIN_FILE C:/vcpkg/scripts/buildsystems/vcpkg.cmake)
project(MYLIB)
set (CMAKE_CXX_STANDARD 14)
find_package(fmt REQUIRED)
include_directories(C:/vcpkg/installed/x64-osx/include)
link_libraries(fmt::fmt)
add_library(mylib SHARED mylib.cpp)
mylib.cpp
#include "mylib.h"
#include <fmt/core.h>
float add(float a, float b)
{
fmt::print("Hello MYLIB, world!\n");
return (a + b);
}
This generates the .dll
but no .lib
, why?