QTfrontend/CMakeLists.txt
branchwebgl
changeset 9244 bb95e351270c
parent 9236 ddd675825672
child 9270 a9b9ebd3d3be
equal deleted inserted replaced
9242:c07f341adad9 9244:bb95e351270c
   144     ${CMAKE_CURRENT_BINARY_DIR}/servermessages.h
   144     ${CMAKE_CURRENT_BINARY_DIR}/servermessages.h
   145     )
   145     )
   146 
   146 
   147 set(hwfr_rez hedgewars.qrc)
   147 set(hwfr_rez hedgewars.qrc)
   148 
   148 
   149 if(${BUILD_ENGINE_LIBRARY})
       
   150     add_definitions(-DHWLIBRARY=1)
       
   151     set(hwlibname "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}")
       
   152     list(APPEND HW_LINK_LIBS ${hwlibname})
       
   153 endif()
       
   154 
   149 
   155 qt4_add_resources(hwfr_rez_src ${hwfr_rez})
   150 qt4_add_resources(hwfr_rez_src ${hwfr_rez})
   156 
   151 
   157 qt4_wrap_cpp(hwfr_moc_srcs ${hwfr_moc_hdrs})
   152 qt4_wrap_cpp(hwfr_moc_srcs ${hwfr_moc_hdrs})
   158 
   153 
   179 #when debugging, always prompt a console to see fronted messages
   174 #when debugging, always prompt a console to see fronted messages
   180 #TODO: check it doesn't interfere on UNIX
   175 #TODO: check it doesn't interfere on UNIX
   181 if(CMAKE_BUILD_TYPE MATCHES "RELEASE")
   176 if(CMAKE_BUILD_TYPE MATCHES "RELEASE")
   182     set(console_access "WIN32")
   177     set(console_access "WIN32")
   183 endif(CMAKE_BUILD_TYPE MATCHES "RELEASE")
   178 endif(CMAKE_BUILD_TYPE MATCHES "RELEASE")
   184 if(${LIBENGINE})
   179 if(${BUILD_ENGINE_LIBRARY})
   185     add_definitions(-DHWLIBRARY)
   180     add_definitions(-DHWLIBRARY=1)
   186     set(HW_LINK_LIBS hwengine ${HW_LINK_LIBS})
   181     set(hwlibname "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}")
   187     link_directories(${EXECUTABLE_OUTPUT_PATH})
   182     list(APPEND HW_LINK_LIBS ${hwlibname})
   188 endif()
   183 endif()
   189 
   184 
   190 add_executable(hedgewars ${console_access}
   185 add_executable(hedgewars ${console_access}
   191     ${hwfr_src}
   186     ${hwfr_src}
   192     ${hwfr_moc_srcs}
   187     ${hwfr_moc_srcs}