Memo-migrated‎ > ‎

Often using CMake commands (to me)

posted Dec 10, 2011, 7:06 PM by Teng-Yok Lee   [ updated Jan 3, 2021, 12:45 AM ]
  • target_LINK_LIBRARIES # Link libraries to a target. Different configurations (Debug or Optimized) can be specified.
  • link_directories: Specify directories in which the linker will look for libraries.
  • include_directories: Add include directories to the build.
  • file(GLOB HEADER_FILES "*.h" ) # grab all .h files into the list HEADER_FILES.
  • Use CUDA
INCLUDE(FindCUDA)    #Include the FindCUDA script
  • CMAKE_PROJECT_NAME: The name of the current project.
  • set_target_properties: Targets can have properties that affect how they are built. One usage is to create different file names under different configuration. Eg. set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES
  • How to use MFC with CMake from CMake FAQ. (Note: .cpp, .h, and .rc must be included!)