Changeset 20076


Ignore:
Timestamp:
04/12/21 20:35:02 (4 years ago)
Author:
tbretz
Message:
Moved rc-files to an etc dir.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/CMakeLists.txt

    r20074 r20076  
    5151
    5252PROJECT(fact++ VERSION ${VERSION})
     53
     54# ======== For config.h.in =========
     55SET(PACKAGE_MAINTAINER "Thomas Bretz")
     56SET(PACKAGE_BUGREPORT  "tbretz@physik.rwth-aachen.de")
     57SET(PACKAGE_URL        "https://www.fact-project.org")
    5358
    5459# *************************************
     
    520525         -DPACKAGE_STRING=\\\"FACT++\\\" \
    521526         -DPACKAGE_URL=\\\"${PACKAGE_URL}\\\" \
    522          -DPACKAGE_BUGREPORT=\\\"${PACKAGE_BUGREPORT}\\\""
     527         -DPACKAGE_BUGREPORT=\\\"${PACKAGE_BUGREPORT}\\\" \
     528         -DPACKAGE_INSTALL_SYSCONFDIR=\\\"${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_SYSCONFDIR}\\\""
    523529         )
    524530
     
    531537# Flags required for Dim
    532538SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -DMIPSEL -DPROTOCOL=1 -Dunix -Dlinux")
    533 
    534 
    535 # ======== For config.h.in =========
    536 SET(PACKAGE_MAINTAINER "Thomas Bretz")
    537 SET(PACKAGE_BUGREPORT  "tbretz@physik.rwth-aachen.de")
    538 SET(PACKAGE_URL        "https://www.fact-project.org")
    539539
    540540
     
    13881388
    13891389# Prepare the file for build interface
    1390 SET(INSTALL_PREFIX ${CMAKE_BINARY_DIR})
     1390SET(PROJECT_ETCDIR ${CMAKE_BINARY_DIR})
     1391SET(PROJECT_LOGDIR ${CMAKE_BINARY_DIR}/log)
     1392FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/log)
    13911393CONFIGURE_FILE(fact++.rc.in fact++.rc @ONLY)
    13921394
    1393 FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/rc)
    1394 FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/log)
     1395#FILE(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/rc)
    13951396
    13961397IF(NOT CMAKE_INSTALL_PREFIX STREQUAL CMAKE_INSTALL_PREFIX_DEFAULT)
    1397 
    1398     # Prepare default fact++.rc for installation
    1399     SET(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
    1400     CONFIGURE_FILE(fact++.rc.in fact++rc.install @ONLY)
    1401     INSTALL(FILES ${CMAKE_BINARY_DIR}/fact++rc.install DESTINATION ${CMAKE_INSTALL_BINDIR} RENAME fact++.rc)
    1402 
    1403     # Create empty directories during installation
     1398    SET(PROJECT_ETCDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_SYSCONFDIR})
     1399    SET(PROJECT_LOGDIR ${CMAKE_INSTALL_PREFIX}/log)
    14041400    INSTALL(DIRECTORY "log" DESTINATION ${CMAKE_INSTALL_PREFIX})
    1405     INSTALL(DIRECTORY "rc"  DESTINATION ${CMAKE_INSTALL_PREFIX})
    1406 
    1407     INSTALL(CODE "MESSAGE(STATUS \"Preparing environment.\")")
    1408     # This is just for convenience as the fact++.rc is read from the directory of the binary itself
    1409     INSTALL(CODE "EXECUTE_PROCESS(COMMAND ln -sf ${CMAKE_INSTALL_BINDIR}/fact++.rc WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})")
    1410 ENDIF()
     1401ELSE()
     1402    SET(PROJECT_ETCDIR ${CMAKE_INSTALL_SYSCONFDIR}/fact++)
     1403    SET(PROJECT_LOGDIR ${CMAKE_INSTALL_LOCALSTATEDIR}/log/fact++)
     1404    INSTALL(DIRECTORY "fact++" DESTINATION ${CMAKE_INSTALL_SYSCONFDIR})
     1405    INSTALL(DIRECTORY "log/fact++" DESTINATION ${CMAKE_INSTALL_LOCALSTATEDIR})
     1406ENDIF()
     1407
     1408# Prepare default fact++.rc for installation
     1409#SET(INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
     1410CONFIGURE_FILE(fact++.rc.in fact++rc.install @ONLY)
     1411INSTALL(FILES ${CMAKE_BINARY_DIR}/fact++rc.install DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} RENAME fact++.rc)
     1412
     1413# Create empty directories during installation
    14111414
    14121415
Note: See TracChangeset for help on using the changeset viewer.