--- CMakeLists.txt.orig 2010-09-19 18:31:26 UTC +++ CMakeLists.txt @@ -82,12 +82,6 @@ IF(NOT LJPGALLEG) MESSAGE(FATAL_ERROR "Fatal error: libjpgalleg not found! ${RTFM}") ENDIF(NOT LJPGALLEG) -# LOGG: liblogg, libogg, libvorbis, libvorbisfile -FIND_LIBRARY(LLOGG NAMES logg PATH "${CMAKE_LIBRARY_PATH}") -IF(NOT LLOGG) - MESSAGE(FATAL_ERROR "Fatal error: liblogg not found! ${RTFM}") -ENDIF(NOT LLOGG) - FIND_LIBRARY(LOGG NAMES ogg PATH "${CMAKE_LIBRARY_PATH}") IF(NOT LOGG) MESSAGE(FATAL_ERROR "Fatal error: libogg not found! ${RTFM}") @@ -150,6 +144,7 @@ SET( src/core/util.c src/core/v2d.c src/core/video.c + ../loggcompat-4.4.2/logg-4.4.2.c src/scenes/util/editorgrp.c src/scenes/util/grouptree.c @@ -250,7 +245,7 @@ IF(UNIX) SET(GAME_SRCS ${GAME_SRCS} src/misc/iconlin.c) ADD_EXECUTABLE(${GAME_UNIXNAME} ${GAME_SRCS}) SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES LINK_FLAGS ${ALLEGRO_UNIX_LIBS}) - TARGET_LINK_LIBRARIES(${GAME_UNIXNAME} m logg vorbisfile vorbis ogg jpgalleg z png loadpng) + TARGET_LINK_LIBRARIES(${GAME_UNIXNAME} m vorbisfile vorbis ogg jpgalleg z png loadpng) SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES COMPILE_FLAGS "-Wall -O2 ${CFLAGS} ${CFLAGS_EXTRA}") ENDIF(UNIX) @@ -392,10 +387,10 @@ IF(WIN32) # Other properties IF(MSVC) SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES COMPILE_FLAGS "/D_CRT_SECURE_NO_DEPRECATE /D__WIN32__ /D__MSVC__ ${CFLAGS} ${CFLAGS_EXTRA}") - TARGET_LINK_LIBRARIES(${GAME_UNIXNAME} logg vorbisfile vorbis ogg jpgalleg loadpng alleg png z) + TARGET_LINK_LIBRARIES(${GAME_UNIXNAME} vorbisfile vorbis ogg jpgalleg loadpng alleg png z) ELSE(MSVC) SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES COMPILE_FLAGS "-Wall -O2 -ansi ${CFLAGS} ${CFLAGS_EXTRA}") - TARGET_LINK_LIBRARIES(${GAME_UNIXNAME} m logg vorbisfile vorbis ogg jpgalleg loadpng alleg png z) + TARGET_LINK_LIBRARIES(${GAME_UNIXNAME} m vorbisfile vorbis ogg jpgalleg loadpng alleg png z) EXECUTE_PROCESS(COMMAND ${CMAKE_RC_COMPILER} -O coff -o src/misc/iconwin.res -i src/misc/iconwin.rc) SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES LINK_FLAGS "src/misc/iconwin.res") ENDIF(MSVC) @@ -410,16 +405,11 @@ SET_TARGET_PROPERTIES(${GAME_UNIXNAME} PROPERTIES PROJ # Installing on *nix IF(UNIX) - SET(GAME_INSTALL_DIR "/usr/share/${GAME_UNIXNAME}") - SET(GAME_FINAL_DIR "/usr/bin") + SET(GAME_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/${GAME_UNIXNAME}") + SET(GAME_FINAL_DIR "${CMAKE_INSTALL_PREFIX}/bin") INSTALL(CODE "MESSAGE(\"Installing ${GAME_NAME} ${GAME_VERSION}... Make sure you have root privileges.\")") INSTALL(TARGETS ${GAME_UNIXNAME} RUNTIME DESTINATION ${GAME_INSTALL_DIR}) INSTALL(FILES license.txt readme.html DESTINATION ${GAME_INSTALL_DIR}) INSTALL(DIRECTORY objects sprites config images levels licenses musics quests samples screenshots themes languages DESTINATION ${GAME_INSTALL_DIR} PATTERN ".svn" EXCLUDE) - - INSTALL(CODE "MESSAGE(\"Creating files at ${GAME_FINAL_DIR}...\")") - INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"cmake\" \"-E\" \"copy\" \"${GAME_INSTALL_DIR}/${GAME_UNIXNAME}\" \"${GAME_FINAL_DIR}/${GAME_UNIXNAME}\")") - - INSTALL(CODE "MESSAGE(\"Done! Please run ${GAME_UNIXNAME} to start ${GAME_NAME}.\")") ENDIF(UNIX)