[CMake] Creating the resource-only dll with NMake

Yuri Timenkov yuri at timenkov.ru
Tue Jan 17 05:39:04 EST 2012


Unfortunately, as I can understand from sources this can't be done in
current CMake version. Only preprocessor definitions are supported.

On Tue, Jan 17, 2012 at 10:20 AM, Kozlovskiy, Alexey
<Alexey_Kozlovskiy at mentor.com> wrote:
> Thanks for support!
> I specified the SET_TARGET_PROPERTIES (${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE "CXX" ) and error was disappear.
>
> Another question is: How to specify the "Culture" properties? In the VS it could be find in the Property Pages -> Resources -> General -> Culture
> Thanks again!
>
> Regards,
> Alexey
>
> -----Original Message-----
> From: Yuri Timenkov [mailto:yuri at timenkov.ru]
> Sent: Tuesday, January 17, 2012 7:28 AM
> To: Kozlovskiy, Alexey
> Cc: cmake at cmake.org
> Subject: Re: [CMake] Creating the resource-only dll with NMake
>
> Won't it work if you set target's linker language to C or C++? I suppose it's a LINKER_LANGUAGE property.
>
> On Mon, Jan 16, 2012 at 6:17 PM, Kozlovskiy, Alexey <Alexey_Kozlovskiy at mentor.com> wrote:
>>
>> 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
>>
>>
>>
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list