source: tol/toltcl/generic/CMakeLists.txt @ 565b311

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

#refrefs #1812, refs #1818, toltcl con mingw32

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

  • Property mode set to 100644
File size: 1.8 KB
Line 
1add_definitions( -DTCL_THREADS )
2include_directories( ${TCL_INCLUDE_PATH} ${TOL_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} )
3 
4message( STATUS "Using TCL_INCLUDE_PATH = ${TCL_INCLUDE_PATH}" )
5message( STATUS "Using TCL_STUB_LIBRARY = ${TCL_STUB_LIBRARY}" )
6message( STATUS "Using TCL_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_library( toltcl SHARED
31  crash.c toltcl.c pool.cpp tclutils.cpp tolaccess.cpp tolsergrp.cpp
32  toltableset.cpp toltime.cpp
33)
34set_target_properties( toltcl PROPERTIES COMPILE_FLAGS "-DBUILD_TOLTCL -DUSE_TCL_STUBS")
35
36target_link_libraries( toltcl
37  ${TCL_STUB_LIBRARY} ${TOL_LIBRARY} )
38
39add_executable( tolsh tolsh.c )
40target_link_libraries( tolsh ${TCL_LIBRARY} )
41
42message( STATUS "TOLTCL_DEST_DIR = ${TOLTCL_DEST_DIR}" )
43install( TARGETS tolsh RUNTIME DESTINATION "bin" )
44if( WIN32 )
45  install( TARGETS toltcl RUNTIME DESTINATION "${TOLTCL_DEST_DIR}" )
46else( WIN32 )
47  install( TARGETS toltcl RUNTIME LIBRARY DESTINATION "${TOLTCL_DEST_DIR}" )
48endif( WIN32 )
Note: See TracBrowser for help on using the repository browser.