[102] | 1 | project (OSCam C)
|
---|
| 2 |
|
---|
[202] | 3 | #----------------------- minimum version of cmake to use ------------
|
---|
[102] | 4 |
|
---|
[202] | 5 | # if you want to switch to 2.6 min, please look at the escaped definitions
|
---|
| 6 | # later in this file (the add_definitions in 2.6 don't need to be escaped),
|
---|
| 7 | # and remove the CMP0005 policy.
|
---|
| 8 | # the CMP0003 could also be removed for cmake 2.6
|
---|
| 9 | cmake_minimum_required (VERSION 2.4)
|
---|
| 10 | if(COMMAND cmake_policy)
|
---|
| 11 | cmake_policy(SET CMP0005 OLD)
|
---|
| 12 | cmake_policy(SET CMP0003 NEW)
|
---|
| 13 | endif(COMMAND cmake_policy)
|
---|
| 14 |
|
---|
[102] | 15 | #----------------------- detect system ------------------------------
|
---|
| 16 |
|
---|
| 17 | if (CMAKE_CROSSCOMPILING)
|
---|
| 18 | if (OSCAM_SYSTEM_NAME MATCHES "Tuxbox")
|
---|
| 19 | set (OSCamOperatingSystem "Tuxbox")
|
---|
[109] | 20 | set (CS_OS_HW "tuxbox")
|
---|
| 21 | set (CS_OS_SYS "linux")
|
---|
[500] | 22 | elseif (OSCAM_SYSTEM_NAME MATCHES "Coolstream")
|
---|
| 23 | set (OSCamOperatingSystem "NeutrinoHD")
|
---|
| 24 | set (CS_OS_HW "coolstream")
|
---|
| 25 | set (CS_OS_SYS "linux")
|
---|
[690] | 26 | elseif (OSCAM_SYSTEM_NAME MATCHES "NSLU2")
|
---|
| 27 | set (OSCamOperatingSystem "SlugOS")
|
---|
| 28 | set (CS_OS_HW "nslu2")
|
---|
| 29 | set (CS_OS_SYS "linux")
|
---|
[102] | 30 | elseif (OSCAM_SYSTEM_NAME MATCHES "Fonera2")
|
---|
| 31 | set (OSCamOperatingSystem "Fonera2")
|
---|
[109] | 32 | set (CS_OS_HW "fonera2")
|
---|
| 33 | set (CS_OS_SYS "linux")
|
---|
[431] | 34 | elseif (OSCAM_SYSTEM_NAME MATCHES "WRT54G")
|
---|
| 35 | set (OSCamOperatingSystem "WRT54G")
|
---|
| 36 | set (CS_OS_HW "wrt54g")
|
---|
| 37 | set (CS_OS_SYS "linux")
|
---|
[104] | 38 | elseif (OSCAM_SYSTEM_NAME MATCHES "Amino")
|
---|
| 39 | set (OSCamOperatingSystem "Amino")
|
---|
[109] | 40 | set (CS_OS_HW "amino")
|
---|
| 41 | set (CS_OS_SYS "linux")
|
---|
[102] | 42 | else (OSCAM_SYSTEM_NAME MATCHES "Tuxbox")
|
---|
[120] | 43 | message (STATUS "Unknown cross system name: <${CMAKE_SYSTEM_NAME}>")
|
---|
[102] | 44 | set (OSCamOperatingSystem "Unknown")
|
---|
[109] | 45 | set (CS_OS_HW "unknown")
|
---|
| 46 | set (CS_OS_SYS "unknown")
|
---|
[102] | 47 | endif (OSCAM_SYSTEM_NAME MATCHES "Tuxbox")
|
---|
| 48 | else (CMAKE_CROSSCOMPILING)
|
---|
| 49 | if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
---|
| 50 | set (OSCamOperatingSystem "Linux")
|
---|
[109] | 51 | set (CS_OS_HW "pc")
|
---|
| 52 | set (CS_OS_SYS "linux")
|
---|
[102] | 53 | elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
---|
| 54 | set (OSCamOperatingSystem "Mac OS X")
|
---|
[109] | 55 | set (CS_OS_HW "mac")
|
---|
| 56 | set (CS_OS_SYS "macosx")
|
---|
[1189] | 57 | SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" )
|
---|
| 58 | SET( CMAKE_CFLAGS "${CMAKE_CFLAGS} -m32" )
|
---|
[120] | 59 | elseif (${CYGWIN})
|
---|
| 60 | set (OSCamOperatingSystem "Windows/Cygwin")
|
---|
| 61 | set (CS_OS_HW "pc")
|
---|
| 62 | set (CS_OS_SYS "cygwin")
|
---|
| 63 | set (CMAKE_SYSTEM_PROCESSOR "i386")
|
---|
[102] | 64 | else (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
---|
[120] | 65 | message (STATUS "Unknown system name: <${CMAKE_SYSTEM_NAME}>")
|
---|
[102] | 66 | set (OSCamOperatingSystem "Unknown")
|
---|
[109] | 67 | set (CS_OS_HW "unknown")
|
---|
| 68 | set (CS_OS_SYS "unknown")
|
---|
[102] | 69 | endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
---|
| 70 | endif (CMAKE_CROSSCOMPILING)
|
---|
| 71 |
|
---|
| 72 | #----------------------- some paths ------------------------------
|
---|
| 73 |
|
---|
| 74 | set (OPTIONAL_LINK_DIR "" CACHE STRING "Some optional link directories")
|
---|
[807] | 75 | set (OPTIONAL_INCLUDE_DIR "" CACHE STRING "Some optional include directories")
|
---|
[102] | 76 |
|
---|
| 77 | include_directories (
|
---|
| 78 | ${CMAKE_CURRENT_SOURCE_DIR}/csctapi
|
---|
| 79 | ${CMAKE_CURRENT_SOURCE_DIR}/cscrypt
|
---|
| 80 | ${OPTIONAL_INCLUDE_DIR}
|
---|
| 81 | )
|
---|
| 82 | link_directories (${OPTIONAL_LINK_DIR})
|
---|
| 83 |
|
---|
| 84 | #----------------------- global options ------------------------------
|
---|
| 85 |
|
---|
| 86 | if (OSCamOperatingSystem MATCHES "Linux")
|
---|
| 87 | add_definitions ("-DOS_LINUX")
|
---|
[108] | 88 | set (DEFAULT_CS_CONFDIR "/usr/local/etc")
|
---|
[102] | 89 | elseif (OSCamOperatingSystem MATCHES "Mac OS X")
|
---|
[776] | 90 | add_definitions ("-DOS_MACOSX -DHAVE_PCSC -DNEED_DAEMON -DCS_NOSHM -DHAVE_PTHREAD_H -DUSE_PTHREAD")
|
---|
[108] | 91 | set (DEFAULT_CS_CONFDIR "/usr/local/etc")
|
---|
[102] | 92 | elseif (OSCamOperatingSystem MATCHES "Tuxbox")
|
---|
| 93 | add_definitions ("-DOS_LINUX -DTUXBOX -DPPC")
|
---|
[108] | 94 | set (DEFAULT_CS_CONFDIR "/var/tuxbox/config")
|
---|
[500] | 95 | elseif (OSCamOperatingSystem MATCHES "NeutrinoHD")
|
---|
[1177] | 96 | add_definitions ("-DOS_LINUX -DTUXBOX -DCOOL")
|
---|
[500] | 97 | set (DEFAULT_CS_CONFDIR "/var/tuxbox/config")
|
---|
[690] | 98 | elseif (OSCamOperatingSystem MATCHES "SlugOS")
|
---|
| 99 | add_definitions ("-DOS_LINUX")
|
---|
| 100 | set (DEFAULT_CS_CONFDIR "/var/etc")
|
---|
[102] | 101 | elseif (OSCamOperatingSystem MATCHES "Fonera2")
|
---|
| 102 | add_definitions ("-DOS_LINUX -DMIPSEL -DUCLIBC")
|
---|
[108] | 103 | set (DEFAULT_CS_CONFDIR "/var/etc")
|
---|
[431] | 104 | elseif (OSCamOperatingSystem MATCHES "WRT54G")
|
---|
| 105 | add_definitions ("-DOS_LINUX -DMIPSEL -DUCLIBC -DUSE_GPIO")
|
---|
| 106 | set (DEFAULT_CS_CONFDIR "/jffs/etc/config/oscam")
|
---|
[104] | 107 | elseif (OSCamOperatingSystem MATCHES "Amino")
|
---|
| 108 | add_definitions ("-DOS_LINUX")
|
---|
[108] | 109 | set (DEFAULT_CS_CONFDIR "/usr/local/etc")
|
---|
[120] | 110 | elseif (OSCamOperatingSystem MATCHES "Windows/Cygwin")
|
---|
[464] | 111 | add_definitions ("-DOS_CYGWIN32 -static")
|
---|
[204] | 112 | set (DEFAULT_CS_CONFDIR ".")
|
---|
[102] | 113 | endif (OSCamOperatingSystem MATCHES "Linux")
|
---|
| 114 |
|
---|
[108] | 115 | set (CS_CONFDIR ${DEFAULT_CS_CONFDIR} CACHE STRING "Default path for the config files")
|
---|
[202] | 116 | add_definitions ("-DCS_CONFDIR=\\\"${CS_CONFDIR}\\\"")
|
---|
[108] | 117 |
|
---|
[109] | 118 | set (CS_OS_CPU ${CMAKE_SYSTEM_PROCESSOR})
|
---|
| 119 | set (CS_OSTYPE ${CS_OS_CPU}-${CS_OS_HW}-${CS_OS_SYS})
|
---|
| 120 |
|
---|
[112] | 121 | add_definitions ("-DUSE_CMAKE")
|
---|
[202] | 122 | add_definitions ("-DCS_OSTYPE=\\\"${CS_OSTYPE}\\\"")
|
---|
| 123 | add_definitions ("-DCS_OS_CPU=\\\"${CS_OS_CPU}\\\"")
|
---|
| 124 | add_definitions ("-DCS_OS_HW=\\\"${CS_OS_HW}\\\"")
|
---|
| 125 | add_definitions ("-DCS_OS_SYS=\\\"${CS_OS_SYS}\\\"")
|
---|
[109] | 126 |
|
---|
[102] | 127 | #----------------------- subdirectories ------------------------------
|
---|
| 128 |
|
---|
[110] | 129 | include (CheckIncludeFile)
|
---|
| 130 | check_include_file ("openssl/aes.h" HAVE_AES)
|
---|
| 131 | if (HAVE_AES)
|
---|
| 132 | add_definitions ("-DHAVE_AES")
|
---|
| 133 | endif (HAVE_AES)
|
---|
| 134 |
|
---|
[712] | 135 | check_include_file ("openssl/sha.h" HAVE_SHA)
|
---|
| 136 | if (HAVE_SHA)
|
---|
| 137 | add_definitions ("-DHAVE_SHA")
|
---|
| 138 | endif (HAVE_SHA)
|
---|
| 139 |
|
---|
[776] | 140 | check_include_file ("PCSC/wintypes.h" HAVE_PCSC)
|
---|
| 141 | if (HAVE_PCSC)
|
---|
| 142 | add_definitions ("-DHAVE_PCSC")
|
---|
[807] | 143 | if (OSCamOperatingSystem MATCHES "Linux")
|
---|
| 144 | add_definitions ("-I/usr/include/PCSC")
|
---|
| 145 | endif (OSCamOperatingSystem MATCHES "Linux")
|
---|
[776] | 146 | endif (HAVE_PCSC)
|
---|
| 147 |
|
---|
[110] | 148 | #----------------------- subdirectories ------------------------------
|
---|
| 149 |
|
---|
[102] | 150 | add_subdirectory (csctapi)
|
---|
| 151 | add_subdirectory (cscrypt)
|
---|
| 152 |
|
---|
| 153 | #----------------------- file groups ------------------------------
|
---|
| 154 |
|
---|
| 155 | file (GLOB csmodules_srcs "module-*.c")
|
---|
| 156 | file (GLOB csmodules_hdrs "module-*.h")
|
---|
| 157 | file (GLOB csreaders_srcs "reader-*.c")
|
---|
| 158 | file (GLOB csreaders_hdrs "reader-*.h")
|
---|
| 159 | file (GLOB csoscam_srcs "oscam-*.c")
|
---|
| 160 | file (GLOB csoscam_hdrs "oscam-*.h")
|
---|
| 161 | file (GLOB exe_srcs "oscam.c")
|
---|
| 162 | file (GLOB exe_hdrs "globals.h")
|
---|
| 163 | file (GLOB all_srcs ${csmodules_srcs} ${csreaders_srcs} ${csoscam_srcs} ${exe_srcs})
|
---|
| 164 |
|
---|
| 165 | #----------------------- modules ------------------------------
|
---|
| 166 |
|
---|
| 167 | set (csmodules "csmodules")
|
---|
| 168 | add_library (${csmodules} STATIC ${csmodules_srcs} ${csmodules_hdrs})
|
---|
| 169 |
|
---|
| 170 | #----------------------- readers ------------------------------
|
---|
| 171 |
|
---|
| 172 | set (csreaders "csreaders")
|
---|
| 173 | add_library (${csreaders} STATIC ${csreaders_srcs} ${csreaders_hdrs})
|
---|
| 174 |
|
---|
| 175 | #----------------------- other oscam files ------------------------------
|
---|
| 176 |
|
---|
| 177 | set (csoscam "csoscam")
|
---|
| 178 | add_library (${csoscam} STATIC ${csoscam_srcs} ${csoscam_hdrs})
|
---|
| 179 |
|
---|
| 180 | #----------------------- the executable ------------------------------
|
---|
| 181 |
|
---|
| 182 | set (exe_name "oscam")
|
---|
| 183 | add_executable (${exe_name} ${exe_srcs} ${exe_hdrs})
|
---|
[1180] | 184 | target_link_libraries (${exe_name} ${csoscam} ${csmodules} ${csreaders} csctapi cscrypt pthread)
|
---|
[110] | 185 | if (HAVE_AES)
|
---|
| 186 | target_link_libraries (${exe_name} crypto)
|
---|
| 187 | endif (HAVE_AES)
|
---|
[776] | 188 | if (HAVE_PCSC)
|
---|
| 189 | if (NOT OSCamOperatingSystem MATCHES "Mac OS X")
|
---|
| 190 | target_link_libraries (${exe_name} pcsclite)
|
---|
| 191 | endif (NOT OSCamOperatingSystem MATCHES "Mac OS X")
|
---|
| 192 | endif (HAVE_PCSC)
|
---|
| 193 |
|
---|
[102] | 194 | add_dependencies (${exe_name} ${csoscam} ${csreaders} ${csmodules})
|
---|
| 195 |
|
---|
| 196 | #----------------------- specific options ------------------------------
|
---|
| 197 |
|
---|
| 198 | if (OSCamOperatingSystem MATCHES "Linux")
|
---|
| 199 | elseif (OSCamOperatingSystem MATCHES "Mac OS X")
|
---|
[776] | 200 | FIND_LIBRARY (PCSC_LIBRARY PCSC)
|
---|
| 201 | message (STATUS "OS X system PCSC : ${PCSC_LIBRARY}")
|
---|
| 202 | target_link_libraries ( ${exe_name} ${PCSC_LIBRARY})
|
---|
| 203 | set (HAVE_PCSC "1")
|
---|
[102] | 204 | elseif (OSCamOperatingSystem MATCHES "Tuxbox")
|
---|
| 205 | target_link_libraries ( ${exe_name} dl)
|
---|
[690] | 206 | elseif (OSCamOperatingSystem MATCHES "SlugOS")
|
---|
[102] | 207 | elseif (OSCamOperatingSystem MATCHES "Fonera2")
|
---|
[431] | 208 | elseif (OSCamOperatingSystem MATCHES "WRT54G")
|
---|
[104] | 209 | elseif (OSCamOperatingSystem MATCHES "Amino")
|
---|
[120] | 210 | elseif (OSCamOperatingSystem MATCHES "Windows/cygwin")
|
---|
[1180] | 211 | elseif (OSCamOperatingSystem MATCHES "NeutrinoHD")
|
---|
| 212 | target_link_libraries ( ${exe_name} rt nxp )
|
---|
[102] | 213 | endif (OSCamOperatingSystem MATCHES "Linux")
|
---|
| 214 |
|
---|
[547] | 215 | #----------------------- put svnversion in the build ------------------------------
|
---|
| 216 | # at every target rebuild, we re-build the oscam.c compilation...
|
---|
| 217 |
|
---|
| 218 | # add the needed dependency
|
---|
| 219 | add_dependencies (${exe_name} svnversion)
|
---|
| 220 | add_dependencies (${csoscam} svnversion-log)
|
---|
| 221 |
|
---|
| 222 | # how to re-build the files which printout the version
|
---|
| 223 | add_custom_target (
|
---|
| 224 | svnversion
|
---|
| 225 | ALL
|
---|
| 226 | touch ${CMAKE_CURRENT_SOURCE_DIR}/oscam.c
|
---|
| 227 | )
|
---|
| 228 | add_custom_target (
|
---|
| 229 | svnversion-log
|
---|
| 230 | ALL
|
---|
| 231 | touch ${CMAKE_CURRENT_SOURCE_DIR}/oscam-log.c
|
---|
| 232 | )
|
---|
| 233 |
|
---|
[959] | 234 | #if the svnversion program is absent, this will leave the SVN_REVISION string empty,
|
---|
| 235 | #but won't stop CMake.
|
---|
| 236 | execute_process (COMMAND "svnversion" "-n" "${CMAKE_CURRENT_SOURCE_DIR}" OUTPUT_VARIABLE OSCAM_SVN_REVISION)
|
---|
| 237 |
|
---|
| 238 | if (OSCAM_SVN_REVISION)
|
---|
| 239 | string (REGEX REPLACE "[0-9]+:" "" OSCAM_SVN_REVISION "${OSCAM_SVN_REVISION}")
|
---|
| 240 | string (REPLACE "M" "" OSCAM_SVN_REVISION "${OSCAM_SVN_REVISION}")
|
---|
| 241 | string (REPLACE "exported" "0" OSCAM_SVN_REVISION "${OSCAM_SVN_REVISION}")
|
---|
| 242 | else (OSCAM_SVN_REVISION)
|
---|
| 243 | set (OSCAM_SVN_REVISION "0")
|
---|
| 244 | endif (OSCAM_SVN_REVISION)
|
---|
| 245 |
|
---|
[547] | 246 | # pass the version to the compilations as a define
|
---|
[959] | 247 | add_definitions ("-D'CS_SVN_VERSION=\"${OSCAM_SVN_REVISION}\"'")
|
---|
[547] | 248 |
|
---|
[122] | 249 | #----------------------- global compile and link options ------------------------------
|
---|
[102] | 250 |
|
---|
[122] | 251 | # some optimisations
|
---|
[1020] | 252 | if (OSCamOperatingSystem MATCHES "Mac OS X")
|
---|
[1140] | 253 | add_definitions ("-O2 -Winline -Wall -Wextra -finline-functions -fomit-frame-pointer -m32")
|
---|
[1020] | 254 | else (OSCamOperatingSystem MATCHES "Mac OS X")
|
---|
[1140] | 255 | add_definitions ("-O2 -Winline -Wall -Wextra -finline-functions -fomit-frame-pointer")
|
---|
[1020] | 256 | endif (OSCamOperatingSystem MATCHES "Mac OS X")
|
---|
[122] | 257 |
|
---|
| 258 | # we don't want the '-rdynamic' in the link command
|
---|
| 259 | set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
|
---|
| 260 |
|
---|
| 261 | # we want to strip
|
---|
[1020] | 262 | if (OSCamOperatingSystem MATCHES "Mac OS X")
|
---|
| 263 | set (CMAKE_EXE_LINKER_FLAGS "-s -m32")
|
---|
| 264 | else (OSCamOperatingSystem MATCHES "Mac OS X")
|
---|
[122] | 265 | set (CMAKE_EXE_LINKER_FLAGS "-s")
|
---|
[1020] | 266 | endif (OSCamOperatingSystem MATCHES "Mac OS X")
|
---|
[107] | 267 | #----------------------- installation -----------------------------
|
---|
| 268 |
|
---|
| 269 | file (GLOB config_files "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/oscam.*")
|
---|
[131] | 270 | file (GLOB doc_files "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/txt/*.txt")
|
---|
| 271 | file (GLOB man1_files "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/man/*.1")
|
---|
| 272 | file (GLOB man5_files "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/man/*.5")
|
---|
[215] | 273 | file (GLOB example_files "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/example/oscam.ac"
|
---|
| 274 | "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/example/oscam.cert"
|
---|
| 275 | "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/example/oscam.conf"
|
---|
| 276 | "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/example/oscam.guess"
|
---|
| 277 | "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/example/oscam.ird"
|
---|
| 278 | "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/example/oscam.server"
|
---|
| 279 | "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/example/oscam.services"
|
---|
| 280 | "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/example/oscam.srvid"
|
---|
| 281 | "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/example/oscam.user")
|
---|
| 282 | file (GLOB monitor_files "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/monitor/mpcs*.sh"
|
---|
| 283 | "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/monitor/mpcs*.tar")
|
---|
[107] | 284 |
|
---|
[120] | 285 | install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${exe_name}${CMAKE_EXECUTABLE_SUFFIX} DESTINATION bin COMPONENT bin)
|
---|
[107] | 286 | install (FILES ${config_files} DESTINATION etc COMPONENT config)
|
---|
| 287 | install (FILES ${doc_files} DESTINATION share/doc/oscam COMPONENT doc)
|
---|
[131] | 288 | install (FILES ${man1_files} DESTINATION share/man/man1 COMPONENT doc)
|
---|
| 289 | install (FILES ${man5_files} DESTINATION share/man/man5 COMPONENT doc)
|
---|
[215] | 290 | install (FILES ${example_files} DESTINATION share/doc/oscam/example COMPONENT doc)
|
---|
| 291 | install (FILES ${monitor_files} DESTINATION share/doc/oscam/monitor COMPONENT doc)
|
---|
[107] | 292 |
|
---|
[123] | 293 | #----------------------- we can use CPack to build pacakges --------------------------
|
---|
| 294 |
|
---|
| 295 | # get version from source file
|
---|
| 296 | execute_process (COMMAND grep CS_VERSION ${CMAKE_CURRENT_SOURCE_DIR}/globals.h
|
---|
| 297 | OUTPUT_VARIABLE CS_VERSION)
|
---|
| 298 | string (REGEX REPLACE ".*\"\(.*\)\".*" "\\1" CS_VERSION ${CS_VERSION})
|
---|
| 299 | string (REGEX REPLACE "\(.*\)\\..*\\..*" "\\1" CPACK_PACKAGE_VERSION_MAJOR ${CS_VERSION})
|
---|
| 300 | string (REGEX REPLACE ".*\\.\(.*\)\\..*" "\\1" CPACK_PACKAGE_VERSION_MINOR ${CS_VERSION})
|
---|
| 301 | string (REGEX REPLACE ".*\\..*\\.\(.*\)" "\\1" CPACK_PACKAGE_VERSION_PATCH ${CS_VERSION})
|
---|
| 302 | set (CPACK_PACKAGE_VERSION
|
---|
| 303 | "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
|
---|
| 304 |
|
---|
| 305 | # compute my filename
|
---|
| 306 | set (CPACK_PACKAGE_FILE_NAME
|
---|
| 307 | "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}-${CS_OSTYPE}")
|
---|
| 308 |
|
---|
| 309 | # wich archive we want to generate
|
---|
| 310 | set (CPACK_GENERATOR "TGZ")
|
---|
| 311 |
|
---|
| 312 | # what to put in the archive
|
---|
| 313 | set (CPACK_STRIP_FILES TRUE)
|
---|
| 314 | set (CPACK_COMPONENTS_ALL bin)# config doc)
|
---|
| 315 |
|
---|
| 316 | # ok, we can now use CPack
|
---|
| 317 | include (CPack)
|
---|
| 318 |
|
---|
[102] | 319 | #----------------------- printout resume -----------------------------
|
---|
| 320 |
|
---|
| 321 | message (STATUS "")
|
---|
| 322 | message (STATUS " operating system: ${OSCamOperatingSystem}")
|
---|
[109] | 323 | message (STATUS " system type: ${CS_OSTYPE}")
|
---|
| 324 | message (STATUS " system: ${CS_OS_SYS}")
|
---|
| 325 | message (STATUS " cpu: ${CS_OS_CPU}")
|
---|
| 326 | message (STATUS " hw: ${CS_OS_HW}")
|
---|
[110] | 327 | if (HAVE_AES)
|
---|
| 328 | message (STATUS " use system aes functions")
|
---|
| 329 | else (HAVE_AES)
|
---|
| 330 | message (STATUS " use built-in aes functions")
|
---|
| 331 | endif (HAVE_AES)
|
---|
[712] | 332 | if (HAVE_SHA)
|
---|
| 333 | message (STATUS " use system sha functions")
|
---|
| 334 | else (HAVE_SHA)
|
---|
| 335 | message (STATUS " use built-in sha functions")
|
---|
| 336 | endif (HAVE_SHA)
|
---|
[776] | 337 | if (HAVE_PCSC)
|
---|
| 338 | message (STATUS " use system pcsc functions")
|
---|
| 339 | endif (HAVE_PCSC)
|
---|
[102] | 340 | message (STATUS "")
|
---|