Skip to content

Commit 25b1001

Browse files
committed
[test] migrate RootIDE test to CMake
1 parent 7c03239 commit 25b1001

3 files changed

Lines changed: 39 additions & 210 deletions

File tree

test/RootIDE/CMakeLists.txt

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Copyright (C) 1995-2026, Rene Brun and Fons Rademakers.
2+
# All rights reserved.
3+
#
4+
# For the licensing terms see $ROOTSYS/LICENSE.
5+
# For the list of contributors see $ROOTSYS/README/CREDITS.
6+
7+
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
8+
9+
project(RootIDE)
10+
11+
find_package(ROOT REQUIRED)
12+
13+
set(CMAKE_CXX_FLAGS ${ROOT_CXX_FLAGS})
14+
15+
include_directories(${ROOT_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR})
16+
17+
set(SOURCES
18+
main.cxx
19+
TGRootIDE.cxx
20+
)
21+
22+
set(HEADERS TGRootIDE.h)
23+
24+
ROOT_GENERATE_DICTIONARY(RIDEDict ${HEADERS} LINKDEF LinkDef.h)
25+
file(COPY ${HEADERS} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
26+
27+
add_executable(RIDE ${SOURCES} RIDEDict.cxx)
28+
target_link_libraries(RIDE ROOT::Core ROOT::Rint ROOT::Gui ROOT::GuiHtml ROOT::Thread ROOT::RIO ROOT::Hist ROOT::Gpad)
29+
set_target_properties(RIDE PROPERTIES ENABLE_EXPORTS 1)
30+
if(MSVC AND NOT CMAKE_GENERATOR MATCHES Ninja)
31+
add_custom_command(TARGET RIDE POST_BUILD
32+
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/RIDE.exe
33+
${CMAKE_CURRENT_BINARY_DIR}
34+
)
35+
set_target_properties(RIDE PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
36+
endif()
37+
38+
install(TARGETS RIDE RUNTIME DESTINATION ${PROJECT_NAME} COMPONENT applications)
39+
install(FILES ${HEADERS} DESTINATION ${PROJECT_NAME} COMPONENT headers)

test/RootIDE/Makefile

Lines changed: 0 additions & 68 deletions
This file was deleted.

test/RootIDE/Makefile.win32

Lines changed: 0 additions & 142 deletions
This file was deleted.

0 commit comments

Comments
 (0)