Skip to content

Commit d71d547

Browse files
committed
ensure that cmake is not dependent on directory it's run in
1 parent bdadc04 commit d71d547

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

.idea/fann.iml

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ IF(BIICODE)
33
INIT_BIICODE_BLOCK()
44

55
# Output folder for binaries
6-
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/../bin/fann/examples)
7-
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/../bin/fann/examples)
6+
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../bin/fann/examples)
7+
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/../bin/fann/examples)
88

99
# Copy datasets for examples if exists
1010
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/datasets)
11-
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/datasets DESTINATION ${CMAKE_SOURCE_DIR}/../bin/)
11+
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/datasets DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/../bin/)
1212
ENDIF()
1313

1414
# Include recipes block for CPP11 activation
@@ -46,7 +46,7 @@ endif ()
4646

4747
project (FANN)
4848

49-
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
49+
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
5050

5151
set (FANN_VERSION_MAJOR 2)
5252
set (FANN_VERSION_MINOR 2)
@@ -85,7 +85,7 @@ SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSIO
8585
IF(WIN32 AND NOT UNIX)
8686
# There is a bug in NSI that does not handle full unix paths properly. Make
8787
# sure there is at least one set of four (4) backlasshes.
88-
# SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
88+
# SET(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
8989
# SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe")
9090
# SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} My Famous Project")
9191
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\leenissen.dk/fann/")

0 commit comments

Comments
 (0)