New install target.
This commit is contained in:
parent
1cdd5964f0
commit
8c19b96bb7
@ -33,8 +33,13 @@ set(CMAKE_C_FLAGS_RELEASE "-O3")
|
|||||||
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3")
|
set(CMAKE_C_FLAGS_RELWITHDEBINFO "-g -O3")
|
||||||
set(CMAKE_C_FLAGS_MINSIZEREL "-Os")
|
set(CMAKE_C_FLAGS_MINSIZEREL "-Os")
|
||||||
|
|
||||||
# TODO: detect libraries here
|
find_package(PkgConfig REQUIRED)
|
||||||
# TODO: set include directories here
|
pkg_check_modules(ALLEG5 REQUIRED allegro-5)
|
||||||
|
pkg_check_modules(ALLEG5-PRIM REQUIRED allegro_primitives-5)
|
||||||
|
pkg_check_modules(ALLEG5-FONT REQUIRED allegro_font-5)
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
SYSTEM ${ALLEG5_INCLUDE_DIRS})
|
||||||
|
|
||||||
set(SRCS
|
set(SRCS
|
||||||
src/main.c)
|
src/main.c)
|
||||||
@ -50,6 +55,11 @@ endif()
|
|||||||
|
|
||||||
add_executable(${TARGET_NAME} ${SRCS})
|
add_executable(${TARGET_NAME} ${SRCS})
|
||||||
|
|
||||||
# TODO: link libraries
|
target_link_libraries(${TARGET_NAME}
|
||||||
|
${ALLEG5_LIBRARIES}
|
||||||
|
${ALLEG5-PRIM_LIBRARIES}
|
||||||
|
${ALLEG5-FONT_LIBRARIES})
|
||||||
|
|
||||||
# TODO: create install instructions
|
install(TARGETS ${TARGET_NAME}
|
||||||
|
RUNTIME DESTINATION bin/
|
||||||
|
CONFIGURATIONS release minsizerel)
|
||||||
|
6
README
6
README
@ -21,7 +21,11 @@ You can then compile the program via the following commands:
|
|||||||
|
|
||||||
This will create a release build with compiler optimizations. If you would like
|
This will create a release build with compiler optimizations. If you would like
|
||||||
a debug build then pass the `-DCMAKE_BUILD_TYPE=debug' flag to the `cmake'
|
a debug build then pass the `-DCMAKE_BUILD_TYPE=debug' flag to the `cmake'
|
||||||
command.
|
command. If you would like to install then run `cmake' with the additional flag
|
||||||
|
`-DCMAKE_INSTALL_PREFIX=<install_dir>'. If you are installing as a user then
|
||||||
|
you may want to set the installation prefix to `/usr/local/', and if you're
|
||||||
|
packaging then please consult your distribution's policies. With this you
|
||||||
|
should be able to run the `make install' target and install the binary.
|
||||||
|
|
||||||
# Contributing
|
# Contributing
|
||||||
--------------
|
--------------
|
||||||
|
Loading…
Reference in New Issue
Block a user