File: falmod.cmake

package info (click to toggle)
falconpl 0.9.6.9-git20120606-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 46,176 kB
  • sloc: cpp: 181,389; ansic: 109,025; yacc: 2,310; xml: 1,218; sh: 403; objc: 245; makefile: 82; sql: 20
file content (44 lines) | stat: -rw-r--r-- 1,129 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
########################################################àà
# Falcon CMAKE suite
# Useful functions to finalize modules
#

macro( falcon_define_module varname modname )
      set( ${varname} "${modname}_fm" )
endmacro()

function(falcon_install_module2 tgt dir )
   if(APPLE)
      set_target_properties(${tgt} PROPERTIES
         PREFIX ""
         SUFFIX ".dylib" )
   else()
      set_target_properties(${tgt} PROPERTIES
         PREFIX "" )
   endif()

   set( CMAKE_INSTALL_PREFIX, "@CMAKE_INSTALL_PREFIX@" )

   if( DEFINED MOD_INSTALL )
      set( dest "${MOD_INSTALL}/${dir}" )
   else()
      set( dest "${Falcon_MOD_DIR}/${dir}" )
   endif()

   install( TARGETS ${tgt}
            DESTINATION ${dest} )
endfunction()

function(falcon_install_module tgt )
   falcon_install_module2( "${tgt}" .)
endfunction()

function(falcon_finalize_module2 tgt libs)
      target_link_libraries(${tgt} ${Falcon_LIBRARIES} ${libs} )
      falcon_install_module( ${tgt} )
endfunction()

function(falcon_finalize_module tgt )
      target_link_libraries(${tgt} ${Falcon_LIBRARIES} )
      falcon_install_module( ${tgt} )
endfunction()