Hello All,

I want to use CMake to manage my MFC projects, and I added the following
code:

    set( CMAKE_MFC_FLAG 2)
    add_executable(MFCDemo WIN32
        ${MFC_RESOURCE_FILES}
        ${MFC_HEADER_FILES}
        ${MFC_SOURCE_FILES}
        )
    target_compile_definitions(MFCDemo
        PUBLIC -D_AFXDLL=1
        PUBLIC -D_UNICODE
        PUBLIC -DUNICODE
        )

It works.
However, my question is that: In addition to the MFC executable, I still
have some non-MFC executables,
and once CMAKE_MFC_FLAG is set, all the add_executables' property should be
"Use MFC in a Shared DLL".
In fact, I want only one MFC executable, and make sure all other
executables are "Use Standard Windows Library".
Is there any way to implement it? It seems CMAKE_MFC_FLAG does not work
with set_target_property or other commands.

Thanks,
Peixuan Zhang
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to