diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index ac6a57a04..6fddf6951 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -55,6 +55,8 @@ SET(NL_VERSION "${NL_VERSION_MAJOR}.${NL_VERSION_MINOR}.${NL_VERSION_PATCH}") # Redirect output files SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) +SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) IF(WIN32) FIND_PACKAGE(External REQUIRED) diff --git a/code/CMakeModules/FindExternal.cmake b/code/CMakeModules/FindExternal.cmake index 506f69697..7e87fd98d 100644 --- a/code/CMakeModules/FindExternal.cmake +++ b/code/CMakeModules/FindExternal.cmake @@ -25,7 +25,8 @@ IF(EXTERNAL_PATH) SET(EXTERNAL_INCLUDE_PATH "${EXTERNAL_PATH}/include") IF(NOT CMAKE_SIZEOF_VOID_P) - MESSAGE(FATAL_ERROR "Size of void* is not set, you should call PROJECT(...) before") + INCLUDE (CheckTypeSize) + CHECK_TYPE_SIZE("void*" CMAKE_SIZEOF_VOID_P) ENDIF(NOT CMAKE_SIZEOF_VOID_P) # Using 32 or 64 bits libraries