I am trying to build the csharp dll from the set of .cs files. I used add_library() function to add the source files(.cs files).But it is giving warning like "add_library for library libname without any source files".Please provide a solution to make it to work.
Thanks in advance.
CMakeLists.txt is:
cmake_minimum_required(VERSION 2.8)
project(MyAddIn)
AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/MyAdd-In/ MyAddIn_SOURCES)
SET_SOURCE_FILES_PROPERTIES(${MyAddIn_SOURCES} PROPERTIES LANGUAGE CSharp)
ADD_LIBRARY(AddInTrg SHARED ${MyAddIn_SOURCES})
SET_TARGET_PROPERTIES(AddInTrg PROPERTIES
LINKER_LANGUAGE CSharp
RUNTIME_OUTPUT_DIRECTORY bin
RUNTIME_OUTPUT_DIRECTORY_DEBUG bin
RUNTIME_OUTPUT_NAME MyAddIn_Bin
ARCHIVE_OUTPUT_DIRECTORY lib
ARCHIVE_OUTPUT_DIRECTORY_DEBUG lib
OUTPUT_NAME MyAddIn_Bin)
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/MyAddIn_Bin.dll
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/MyAdd-In
COMMAND C:/WINDOWS/Microsoft.NET/Framework/v3.5/csc.exe
ARGS
-target:library
-out ${CMAKE_CURRENT_BINARY_DIR}/bin/MyAddIn_Bin.dll
"${CMAKE_CURRENT_SOURCE_DIR}/MyAdd-In/Ribbon.cs" "${CMAKE_CURRENT_SOURCE_DIR}/MyAdd-In/ThisAddIn.cs" "${CMAKE_CURRENT_SOURCE_DIR}/MyAdd-In/Ribbon.xml"
COMMENT "-- Generating AddIn Dll")