[CMake] Creating the resource-only dll with NMake

Kozlovskiy, Alexey Alexey_Kozlovskiy at mentor.com
Mon Jan 16 09:17:20 EST 2012


Hi,

I tried to create a simple CMake project to assemble a resource only dll. My CMakeList.txt file:
cmake_minimum_required(VERSION 2.8)
set (PROJECT_NAME viewerResDLL)
project ( ${PROJECT_NAME} )
set ( SRCS_MAIN
               viewerres_en.rc
               )
set ( HDRS_MAIN
               resource.h
               )
add_library ( ${PROJECT_NAME} SHARED ${SRCS_MAIN} ${HDRS_MAIN} )
SET_TARGET_PROPERTIES (${PROJECT_NAME} PROPERTIES LINK_FLAGS "/MANIFEST:NO /NODEFAULTLIB /NOENTRY" )

I execute CMake with the following flags:
cmake -DCMAKE_BUILD_TYPE=Release -G"NMake Makefiles"

and receive the following error:
-- Configuring done
CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly.
Missing variable is:
CMAKE_RC_CREATE_SHARED_LIBRARY
-- Generating done

"Nmake all" command finished without any errors, but in the same time without any results - viewerResDLL.dll not created.
If I use the "Visual Studio 9 2008 Win64" generator all looks working correct and I'm able to build viewerResDLL.dll

Any help will be very appreciated...
Thanks!

Regards,
Alexey

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120116/fa54db35/attachment.htm>


More information about the CMake mailing list