As a result for my build it is expected to upload on the Artifactory repository both .dll and .lib file. Currently I am getting just .lib.
Can I add something additional to have .dll generated as well as repo expects that?
project(SystemUtils)
find_package(LogMsg REQUIRED)
set(SOURCES
  Eventlog.cpp
  OSObjects.cpp
)
set(HEADERS
  Eventlog.h
  OSObjects.h
  StdAfx.h
)
set(SOURCES
  ${SOURCES}
  ${MAIN_SOURCES}
)
set(HEADERS
  ${HEADERS}
  ${MAIN_HEADERS}
)
if(WIN32)
  set(CMAKE_CXX_FLAGS 
    "${CMAKE_CXX_FLAGS} -EHa -Fd$(OutDir)$(TargetName).pdb"
  )
endif()    
add_library(${PROJECT_NAME} HEADERS SOURCES)
target_include_directories(${PROJECT_NAME}
  PUBLIC .
  PUBLIC ${FALogMsg_INCLUDE_DIRS}
)
target_link_libraries(${PROJECT_NAME})
                You can use this CMake command in windows platform:
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
then the import library(.lib file) for your dll will be generated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With