Memo‎ > ‎

Detect Win32/Win64 in CMake

posted Aug 19, 2012, 10:16 AM by Teng-Yok Lee
Use the variable CMAKE_SIZEOF_VOID_P . For example,

    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
        target_link_libraries(${PROJECT_NAME}
                debug    cudpp64d        optimized    cudpp64           
            )
    else()
        target_link_libraries(${PROJECT_NAME}
                debug    cudpp32d        optimized    cudpp32
            )
    endif()


More detail can be seen in the post below:

http://www.cmake.org/pipermail/cmake/2011-January/042058.html
Comments