From b64d4225beca4ce3ef5d1a4777e10469c215c20f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 20 Sep 2015 23:19:38 +0200 Subject: [PATCH] Declare link directories prior to using them As it turns out, you have to declare your link directories before you use them in cmake, otherwise your executables/binaries will have no knowledge of them. This should fix travis builds for mingw. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de942e7807..c392ed1def 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,6 +62,9 @@ if (UNIX) INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS}) endif (UNIX) +INCLUDE_DIRECTORIES(${ORCTLIBS_INCLUDE} ${JANSSON_INCLUDE}) +LINK_DIRECTORIES(${LINK_DIRECTORIES} ${LIB32} ${SDL2_LIBRARY_DIRS} ${ORCTLIBS_LIB_DIR}) + if (WIN32) # build as library for now, replace with add_executable add_library(${PROJECT} SHARED ${ORCT2_SOURCES}) @@ -69,9 +72,6 @@ else (WIN32) add_executable(${PROJECT} ${ORCT2_SOURCES}) endif (WIN32) -INCLUDE_DIRECTORIES(${ORCTLIBS_INCLUDE} ${JANSSON_INCLUDE}) -LINK_DIRECTORIES(${LINK_DIRECTORIES} ${LIB32} ${SDL2_LIBRARY_DIRS} ${ORCTLIBS_LIB_DIR}) - # install into ${CMAKE_INSTALL_PREFIX}/bin/ #install (TARGETS ${PROJECT} DESTINATION bin)