source: tol/tolbase/generic/CMakeLists.txt @ ee9644c

1941-docker-image-to-testdevel
Last change on this file since ee9644c was ee9644c, checked in by Pedro Gea <pgea@…>, 11 years ago

Refs #1827
Se incorpora el icono al ejecutable de TOLBase

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

  • Property mode set to 100644
File size: 1.6 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 = ${TK_LIBRARY}" )
7
8if ( WIN32 )
9  set( CMAKE_EXE_LINKER_FLAGS  "${CMAKE_EXE_LINKER_FLAGS} -mwindows" )
10else ( WIN32 )
11        # use, i.e. don't skip the full RPATH for the build tree
12  SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
13
14  # when building, don't use the install RPATH already
15  # (but later on when installing)
16  SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
17
18  SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
19
20  # add the automatically determined parts of the RPATH
21  # which point to directories outside the build tree to the install RPATH
22  SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
23
24  # the RPATH to be used when installing, but only if it's not a system directory
25  LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
26  IF("${isSystemDir}" STREQUAL "-1")
27     SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
28  ENDIF("${isSystemDir}" STREQUAL "-1")
29endif( WIN32 )
30
31set(RES_FILES "")
32if(MINGW)
33 set(RES_FILES "tolbase-gnu.rc")
34 set(CMAKE_RC_COMPILER_INIT windres)
35 ENABLE_LANGUAGE(RC)
36 SET(CMAKE_RC_COMPILE_OBJECT
37 "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
38endif(MINGW)
39
40add_executable( tolbase tolbase.c ${RES_FILES})
41
42target_link_libraries( tolbase ${TCL_LIBRARY} ${TK_LIBRARY} )
43
44message( STATUS "TOLBASE_DEST_DIR = ${TOLBASE_DEST_DIR}" )
45install( TARGETS tolbase RUNTIME DESTINATION "bin" )
Note: See TracBrowser for help on using the repository browser.