diff --git a/pandatool/CMakeLists.txt b/pandatool/CMakeLists.txt index d3f6347736..3ebe06ac35 100644 --- a/pandatool/CMakeLists.txt +++ b/pandatool/CMakeLists.txt @@ -28,6 +28,7 @@ add_subdirectory(src/imageprogs) add_subdirectory(src/lwo) add_subdirectory(src/lwoegg) add_subdirectory(src/lwoprogs) +add_subdirectory(src/mac-stats) add_subdirectory(src/miscprogs) add_subdirectory(src/objegg) add_subdirectory(src/objprogs) diff --git a/pandatool/src/gtk-stats/CMakeLists.txt b/pandatool/src/gtk-stats/CMakeLists.txt index 26b4dd0372..2305c59404 100644 --- a/pandatool/src/gtk-stats/CMakeLists.txt +++ b/pandatool/src/gtk-stats/CMakeLists.txt @@ -34,7 +34,7 @@ target_link_libraries(gtk-stats p3progbase p3pstatserver PKG::GTK3) # This program is NOT actually called gtk-stats. It's pstats-gtk on Win32 and # pstats everywhere else (as the Win32 GUI is not built). -if(WIN32) +if(WIN32 OR APPLE) set_target_properties(gtk-stats PROPERTIES OUTPUT_NAME "pstats-gtk") else() set_target_properties(gtk-stats PROPERTIES OUTPUT_NAME "pstats") diff --git a/pandatool/src/mac-stats/CMakeLists.txt b/pandatool/src/mac-stats/CMakeLists.txt new file mode 100644 index 0000000000..bb56cd0771 --- /dev/null +++ b/pandatool/src/mac-stats/CMakeLists.txt @@ -0,0 +1,53 @@ +if(NOT APPLE OR NOT HAVE_NET) + return() +endif() + +set(MACSTATS_HEADERS + macStats.h + macStatsAppDelegate.h + macStatsChartMenu.h + macStatsChartMenuDelegate.h + macStatsFlameGraph.h + macStatsGraph.h + macStatsGraphView.h + macStatsGraphViewController.h + macStatsLabel.h + macStatsLabelStack.h + macStatsMonitor.h + macStatsPianoRoll.h + macStatsScaleArea.h + macStatsServer.h + macStatsStripChart.h + macStatsTimeline.h +) + +set(MACSTATS_SOURCES + macStats.mm + macStatsAppDelegate.mm + macStatsChartMenu.mm + macStatsChartMenuDelegate.mm + macStatsFlameGraph.mm + macStatsGraph.mm + macStatsGraphView.mm + macStatsGraphViewController.mm + macStatsLabel.mm + macStatsLabelStack.mm + macStatsMonitor.mm + macStatsPianoRoll.mm + macStatsScaleArea.mm + macStatsServer.mm + macStatsStripChart.mm + macStatsTimeline.mm +) + +composite_sources(mac-stats MACSTATS_SOURCES) +add_executable(mac-stats ${MACSTATS_HEADERS} ${MACSTATS_SOURCES}) +target_link_libraries(mac-stats p3progbase p3pstatserver) +target_link_libraries(mac-stats "-framework Cocoa") +target_link_libraries(mac-stats "-framework Carbon") +target_link_libraries(mac-stats "-framework Quartz") + +# This program is NOT actually called win-stats. It's just pstats +set_target_properties(mac-stats PROPERTIES OUTPUT_NAME "pstats") + +install(TARGETS mac-stats EXPORT Tools COMPONENT Tools DESTINATION ${CMAKE_INSTALL_BINDIR})