CMakeLists.txt 438 B

1234567891011
  1. # a target with the same name as a target in a different dir
  2. add_executable(mytest_exe conly.c)
  3. set_target_properties(mytest_exe PROPERTIES OUTPUT_NAME mytest)
  4. target_link_libraries(mytest_exe mytest)
  5. # and two targets in the same dir with the same name
  6. add_library(mytest2 ../Lib1/libc1.c)
  7. add_executable(mytest2_exe conly.c)
  8. set_target_properties(mytest2_exe PROPERTIES OUTPUT_NAME mytest2)
  9. target_link_libraries(mytest2_exe mytest2)