Add the demo for good order

This commit is contained in:
Deukhoofd 2021-07-13 18:58:50 +02:00
parent bde42f320f
commit 8bc6cfc269
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
3 changed files with 9 additions and 1 deletions

View File

@ -8,6 +8,7 @@ add_compile_options(-Wall -Wextra -Werror)
option(WINDOWS "Whether the build target is Windows or not." OFF)
option(SHARED "Whether we should build a shared library, instead of a static one." OFF)
option(DEMO "Whether or not the demo should be built." OFF)
if (NOT WINDOWS)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@ -44,3 +45,9 @@ if (STATICC)
set(LINKS -static-libgcc -static-libstdc++ -Wl,-Bstatic -lm -lstdc++ -lpthread -Wl,-Bdynamic ${LINKS})
endif(STATICC)
target_link_libraries(atomorph ${LINKS})
if (DEMO)
file(GLOB_RECURSE DEMO_SRC_FILES "demo/*.cpp")
add_executable(atomorph_demo ${DEMO_SRC_FILES})
target_link_libraries(atomorph_demo atomorph -lpthread)
endif()

View File

@ -8,6 +8,7 @@
#include "main.h"
#include "lodepng.h"
#include "../src/atomorph.h"
MORPH_OPTIONS options;

View File

@ -3,7 +3,7 @@
* See Copyright Notice at the end of this file.
*/
#include "../atomorph.h"
#include "../src/atomorph.h"
#include "options.h"
bool init (int argc, char **argv);