add_executable(bitmapcode bitmapcode.cpp) if (MSVC) target_link_libraries(bitmapcode LINK_PUBLIC ${wxWidgets_LIBRARIES}) add_custom_command( TARGET bitmapcode POST_BUILD COMMAND bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps) elseif (APPLE) target_link_libraries(bitmapcode LINK_PUBLIC c++ ${wxWidgets_LIBRARIES}) add_custom_command( TARGET bitmapcode POST_BUILD COMMAND bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps) else() target_link_libraries(bitmapcode LINK_PUBLIC ${wxWidgets_LIBRARIES}) add_custom_command( TARGET bitmapcode POST_BUILD COMMAND bitmapcode ${CMAKE_SOURCE_DIR}/bitmaps) endif()