--- a/QTfrontend/CMakeLists.txt Wed Dec 19 18:23:29 2012 +0100
+++ b/QTfrontend/CMakeLists.txt Wed Dec 19 19:28:13 2012 +0100
@@ -137,14 +137,9 @@
set(hwfr_rez hedgewars.qrc)
if(BUILD_ENGINE_LIBRARY)
- add_definitions(-DHWLIBRARY)
- if (APPLE)
- set (hwlibname hwengine)
- else (APPLE)
- set (hwlibname "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}hwLibrary${CMAKE_SHARED_LIBRARY_SUFFIX}")
- endif (APPLE)
+ add_definitions(-DHWLIBRARY=1)
+ set(hwlibname "${EXECUTABLE_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}")
set(HW_LINK_LIBS ${hwlibname} ${HW_LINK_LIBS})
- link_directories(${EXECUTABLE_OUTPUT_PATH})
endif()
qt4_add_resources(hwfr_rez_src ${hwfr_rez})
--- a/hedgewars/CMakeLists.txt Wed Dec 19 18:23:29 2012 +0100
+++ b/hedgewars/CMakeLists.txt Wed Dec 19 19:28:13 2012 +0100
@@ -10,7 +10,7 @@
#SOURCE AND PROGRAMS SECTION
if(${BUILD_ENGINE_LIBRARY})
- set(engine_output_name "${CMAKE_SHARED_LIBRARY_PREFIX}hwLibrary${CMAKE_SHARED_LIBRARY_SUFFIX}")
+ set(engine_output_name "${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}")
set(hwengine_project ${hedgewars_SOURCE_DIR}/hedgewars/hwLibrary.pas)
else()
set(engine_output_name "hwengine${CMAKE_EXECUTABLE_SUFFIX}")
@@ -206,7 +206,7 @@
#here is the command for standard executables or for shared library
add_custom_command(OUTPUT "${EXECUTABLE_OUTPUT_PATH}/${engine_output_name}"
COMMAND "${FPC_EXECUTABLE}"
- ARGS ${fpc_flags}
+ ARGS ${fpc_flags} -o${engine_output_name}
MAIN_DEPENDENCY ${hwengine_project}
DEPENDS ${engine_sources}
)