source: tol/tolbase/generic/CMakeLists.txt @ 4fce39e

1941-docker-image-to-testdevel
Last change on this file since 4fce39e was 4fce39e, checked in by Jorge Pérez <josp.jorge@…>, 12 years ago

refs #1818, #1812, compilación del ejecutable de tolbase basado en CMake

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@6510 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 1.3 KB
Line 
1add_definitions( -DTCL_THREADS -DTOLBASE_VERSION=\"${TOLBASE_VERSION_MAJOR}.${TOLBASE_VERSION_MINOR}\")
2include_directories( ${TCL_INCLUDE_PATH} )
3 
4message( STATUS "Using TCL_INCLUDE_PATH = ${TCL_INCLUDE_PATH}" )
5message( STATUS "Using TCL_LIBRARY = ${TCL_LIBRARY}" )
6message( STATUS "Using TK_LIBRARY = ${TCL_LIBRARY}" )
7
8if ( NOT WIN32 )
9        # use, i.e. don't skip the full RPATH for the build tree
10  SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
11
12  # when building, don't use the install RPATH already
13  # (but later on when installing)
14  SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
15
16  SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
17
18  # add the automatically determined parts of the RPATH
19  # which point to directories outside the build tree to the install RPATH
20  SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
21
22
23  # the RPATH to be used when installing, but only if it's not a system directory
24  LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
25  IF("${isSystemDir}" STREQUAL "-1")
26     SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
27  ENDIF("${isSystemDir}" STREQUAL "-1")
28endif( NOT WIN32 )
29
30add_executable( tolbase tolbase.c )
31target_link_libraries( tolbase ${TCL_LIBRARY} ${TK_LIBRARY} )
32
33message( STATUS "TOLBASE_DEST_DIR = ${TOLBASE_DEST_DIR}" )
34install( TARGETS tolbase RUNTIME DESTINATION "bin" )
Note: See TracBrowser for help on using the repository browser.