Changeset 120


Ignore:
Timestamp:
07/22/09 14:04:39 (11 years ago)
Author:
smurzch2
Message:

cmake now works with Windows/cygwin too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r112 r120  
    1919        set (CS_OS_SYS "linux")
    2020    else (OSCAM_SYSTEM_NAME MATCHES "Tuxbox")
     21        message (STATUS "Unknown cross system name: <${CMAKE_SYSTEM_NAME}>")
    2122        set (OSCamOperatingSystem "Unknown")
    2223        set (CS_OS_HW "unknown")
     
    3233        set (CS_OS_HW "mac")
    3334        set (CS_OS_SYS "macosx")
     35    elseif (${CYGWIN})
     36        set (OSCamOperatingSystem "Windows/Cygwin")
     37        set (CS_OS_HW "pc")
     38        set (CS_OS_SYS "cygwin")
     39        set (CMAKE_SYSTEM_PROCESSOR "i386")
    3440    else (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
     41        message (STATUS "Unknown system name: <${CMAKE_SYSTEM_NAME}>")
    3542        set (OSCamOperatingSystem "Unknown")
    3643        set (CS_OS_HW "unknown")
     
    6774elseif (OSCamOperatingSystem MATCHES "Amino")
    6875    add_definitions ("-DOS_LINUX")
     76    set (DEFAULT_CS_CONFDIR "/usr/local/etc")
     77elseif (OSCamOperatingSystem MATCHES "Windows/Cygwin")
     78    add_definitions ("-DOS_CYGWIN32")
    6979    set (DEFAULT_CS_CONFDIR "/usr/local/etc")
    7080endif (OSCamOperatingSystem MATCHES "Linux")
     
    126136set (exe_name "oscam")
    127137add_executable (${exe_name} ${exe_srcs} ${exe_hdrs})
     138target_link_libraries (${exe_name} ${csoscam} ${csmodules} ${csreaders} csctapi cscrypt pthread)
    128139if (HAVE_AES)
    129140    target_link_libraries (${exe_name} crypto)
    130141endif (HAVE_AES)
    131 target_link_libraries (${exe_name} pthread ${csoscam} ${csmodules} ${csreaders} csctapi cscrypt)
    132142add_dependencies (${exe_name} ${csoscam} ${csreaders} ${csmodules})
    133143
     
    140150elseif (OSCamOperatingSystem MATCHES "Fonera2")
    141151elseif (OSCamOperatingSystem MATCHES "Amino")
     152elseif (OSCamOperatingSystem MATCHES "Windows/cygwin")
    142153endif (OSCamOperatingSystem MATCHES "Linux")
    143154
     
    149160file (GLOB doc_files "${CMAKE_CURRENT_SOURCE_DIR}/Distribution/doc/*.txt")
    150161
    151 install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${exe_name} DESTINATION bin COMPONENT bin)
     162install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${exe_name}${CMAKE_EXECUTABLE_SUFFIX} DESTINATION bin COMPONENT bin)
    152163install (FILES ${config_files} DESTINATION etc COMPONENT config)
    153164install (FILES ${doc_files} DESTINATION share/doc/oscam COMPONENT doc)
Note: See TracChangeset for help on using the changeset viewer.