QTfrontend/CMakeLists.txt
changeset 2239 d7b5c65f7544
parent 2230 d6963f72d21a
child 2261 57e99c908e7c
equal deleted inserted replaced
2238:1a0d26408324 2239:d7b5c65f7544
    16 #include_directories(${QCA2_INCLUDE_DIR})
    16 #include_directories(${QCA2_INCLUDE_DIR})
    17 
    17 
    18 # Configure for SDL
    18 # Configure for SDL
    19 find_package(SDL REQUIRED)
    19 find_package(SDL REQUIRED)
    20 
    20 
       
    21 include_directories(.)
    21 include_directories(${SDL_INCLUDE_DIR})
    22 include_directories(${SDL_INCLUDE_DIR})
    22 
       
    23 if(UNIX)
    23 if(UNIX)
    24 	include_directories("/usr/local/include") # HACK: in freebsd cannot find iconv.h included via SDL.h
    24 	include_directories("/usr/local/include") # HACK: in freebsd cannot find iconv.h included via SDL.h
    25 endif(UNIX)
    25 endif(UNIX)
    26 
    26 
    27 # Done
       
    28 include_directories(.)
       
    29 
       
    30 set(CMAKE_CXX_FLAGS "-Wall -pipe")
       
    31 set(CMAKE_CXX_FLAGS_RELEASE "-w -O2 -fomit-frame-pointer")
       
    32 set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
       
    33 
    27 
    34 if(WIN32 AND NOT UNIX)
    28 if(WIN32 AND NOT UNIX)
    35 	set(HEDGEWARS_BINDIR ".")
    29 	set(HEDGEWARS_BINDIR ".")
    36 	set(HEDGEWARS_DATADIR "../share/")
    30 	set(HEDGEWARS_DATADIR "../share/")
    37 else(WIN32 AND NOT UNIX)
    31 else(WIN32 AND NOT UNIX)
    40 		set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR})
    34 		set(HEDGEWARS_DATADIR ${DATA_INSTALL_DIR})
    41 	else(DEFINED DATA_INSTALL_DIR)
    35 	else(DEFINED DATA_INSTALL_DIR)
    42 		set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/)
    36 		set(HEDGEWARS_DATADIR ${CMAKE_INSTALL_PREFIX}/share/)
    43 	endif(DEFINED DATA_INSTALL_DIR)
    37 	endif(DEFINED DATA_INSTALL_DIR)
    44 endif(WIN32 AND NOT UNIX)
    38 endif(WIN32 AND NOT UNIX)
       
    39 
    45 
    40 
    46 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hwconsts.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp)
    41 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/hwconsts.cpp.in ${CMAKE_CURRENT_BINARY_DIR}/hwconsts.cpp)
    47 
    42 
    48 set(hwfr_src
    43 set(hwfr_src
    49 	game.cpp
    44 	game.cpp