cmake_minimum_required(VERSION 3.0) project(AculUtils) # Find ROOT package find_package(ROOT REQUIRED) # Set installation prefix # set(CMAKE_INSTALL_PREFIX "..") # Set output directories for built targets # set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) # set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) message(STATUS "CMAKE_LIBRARY_OUTPUT_DIRECTORY is: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") # file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/lib) # prevent mkdir races # set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) # set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) # set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) # message(STATUS "ROOT Configuration \n # System ${CMAKE_SYSTEM} # Processor ${PROCESSOR} (${CMAKE_SYSTEM_PROCESSOR}) # Build type ${CMAKE_BUILD_TYPE} # Install path ${CMAKE_INSTALL_PREFIX} # Compiler ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION} # Compiler flags: # C ${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${_BUILD_TYPE_UPPER}} # C++ ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${_BUILD_TYPE_UPPER}} # Linker flags: # Executable ${CMAKE_EXE_LINKER_FLAGS} # Module ${CMAKE_MODULE_LINKER_FLAGS} # Shared ${CMAKE_SHARED_LINKER_FLAGS}\n") # Add include directories for ROOT include_directories(${ROOT_INCLUDE_DIRS}) # Print the value of ROOT_INCLUDE_DIRS message(STATUS "ROOT include directories: ${ROOT_INCLUDE_DIRS}") message(STATUS "ROOT_GET_INSTALL_DIR: ${ROOT_GET_INSTALL_DIR}") # ROOT_GET_INSTALL_DIR ROOT_GET_INSTALL_DIR(shared_lib_install_dir) # Add the subdirectories add_subdirectory(TELoss) add_subdirectory(AculCalib) add_subdirectory(AculData) add_subdirectory(Utilities) # install(FILES ${CMAKE_CURRENT_BINARY_DIR}/G__AculData.cxx DESTINATION include) # install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libAculData.rootmap DESTINATION lib) # install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libAculData_rdict.pcm DESTINATION lib) # install(TARGETS AculData LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) # Set the output directory for the dictionary files # set(GEN_DICT_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) # set(GEN_DICT_OUTPUT_DIR ${CMAKE_BINARY_DIR}) message(STATUS "GEN_DICT_OUTPUT_DIR: ${GEN_DICT_OUTPUT_DIR}") message(STATUS "CMAKE_CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}") message(STATUS "CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}") message(STATUS "GEN_DICT_OUTPUT_DIR: ${GEN_DICT_OUTPUT_DIR}") message(STATUS "CMAKE_COMMAND: ${CMAKE_COMMAND}") # set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) # message(STATUS "CMAKE_LIBRARY_OUTPUT_DIRECTORY: ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}") # message(STATUS "shared_lib_install_dir: ${shared_lib_install_dir}")