# executable set( EXE_NAME parcat ) # get source files file( GLOB SRC_FILES "*.cpp" ) # get include files file( GLOB INC_FILES "*.h" ) # add executable add_executable( ${EXE_NAME} ${SRC_FILES} ${INC_FILES} ) target_link_libraries( ${EXE_NAME} Threads::Threads ${ADDITIONAL_LIBS} ) # include the output directory, where the svnrevision.h file is generated include_directories(${CMAKE_CURRENT_BINARY_DIR}) if( CMAKE_SYSTEM_NAME STREQUAL "Linux" ) add_custom_command( TARGET ${EXE_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $<$:${CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG}/parcat> $<$:${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE}/parcat> $<$:${CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO}/parcat> $<$:${CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL}/parcat> $<$:${CMAKE_SOURCE_DIR}/bin/parcatStaticd> $<$:${CMAKE_SOURCE_DIR}/bin/parcatStatic> $<$:${CMAKE_SOURCE_DIR}/bin/parcatStaticp> $<$:${CMAKE_SOURCE_DIR}/bin/parcatStaticm> ) endif() # set the folder where to place the projects set_target_properties( ${EXE_NAME} PROPERTIES FOLDER app LINKER_LANGUAGE CXX )