misc/libphyslayer/CMakeLists.txt
branchsdl2transition
changeset 11374 28c309f45269
parent 11362 ed5a6478e710
child 11659 71bdf987e41f
equal deleted inserted replaced
11373:011c5cc195cc 11374:28c309f45269
       
     1 find_package(SDL2 REQUIRED)
     1 
     2 
     2 if(${NOSDL2})
     3 include_directories(${SDL2_INCLUDE_DIR})
     3     find_package(SDL REQUIRED)
       
     4     include_directories(${SDL_INCLUDE_DIR})
       
     5 else(${NOSDL2})
       
     6     find_package(SDL2 REQUIRED)
       
     7     include_directories(${SDL2_INCLUDE_DIR})
       
     8     set(SDL_LIBRARY ${SDL2_LIBRARY})
       
     9 endif(${NOSDL2})
       
    10 
       
    11 include_directories(${PHYSFS_INCLUDE_DIR})
     4 include_directories(${PHYSFS_INCLUDE_DIR})
    12 include_directories(${LUA_INCLUDE_DIR})
     5 include_directories(${LUA_INCLUDE_DIR})
    13 
     6 
    14 
     7 
    15 set(PHYSLAYER_SRCS
     8 set(PHYSLAYER_SRCS
    20 )
    13 )
    21 
    14 
    22 #compiles and links actual library
    15 #compiles and links actual library
    23 add_library (physlayer ${PHYSLAYER_SRCS})
    16 add_library (physlayer ${PHYSLAYER_SRCS})
    24 #TODO: find good VERSION and SOVERSION values
    17 #TODO: find good VERSION and SOVERSION values
    25 target_link_libraries(physlayer ${SDL_LIBRARY} lua physfs)
    18 target_link_libraries(physlayer ${SDL2_LIBRARY} lua physfs)
    26 install(TARGETS physlayer RUNTIME DESTINATION ${target_binary_install_dir}
    19 install(TARGETS physlayer RUNTIME DESTINATION ${target_binary_install_dir}
    27                           LIBRARY DESTINATION ${target_library_install_dir}
    20                           LIBRARY DESTINATION ${target_library_install_dir}
    28                           ARCHIVE DESTINATION ${target_library_install_dir})
    21                           ARCHIVE DESTINATION ${target_library_install_dir})
    29 get_target_property(physlayer_fullpath physlayer LOCATION)
    22 get_target_property(physlayer_fullpath physlayer LOCATION)
    30 
    23